Jump to content

Recommended Posts

Posted

Hi!

Thought this wouldn't be a new problem, but I don't seem to be able to find any post on this subject. Could be because I'm new to this site and to unattended installation. Anyhow..

I'm installing an application using start.cmd from ..\$OEM$\$1\INSTALL.

The application uses setup.iss and in this, there's a distinct path: C:\Program Files\.. etc. for where to install the app. That works fine.

My problem is this: How do I make the installation independant of the drive stated in setup.iss? I wish to be able to use the installation-CD for partitions different from C:

If I use %systemdrive%\Program Files\... it tries to install the app in the ..\$1\INSTALL dir. which of cause fails.

I'd be happy to any guidance whatsoever.

Thanks in advance!


Posted (edited)

The problem is, that iss-files doesn't know environment variables. So in your batch, you have to generate the iss-file before the installation. So for example, for the installation of the Cisco VPN-Client I have two iss files (vpn-setup1.iss and vpn-setup2.iss), which contain the text before and after the line with the programfiles-path. Then my batch looks like this( assuming, that ii is located in the dame directory, as the setup.exe and the two iss-files)

@echo off
REM Change to the current directory
cd /D %~dp0

REM Create the answer file, independent of the Program fiels directory
type vpn-setup1.iss > setup.iss
echo szDir=%PROGRAMFILES%\Cisco Systems\VPN Client >> setup.iss
type vpn-setup2.iss >> setup.iss

REM Start the silent installation
start "" /wait setup.exe -s

Edited by Doc Symbiosis

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...