VPN Client (Win2000/98/95/NT) and Silent Install
Novell Cool Solutions: Feature
Digg This -
Posted: 18 Jan 2002
How to Distribute Apps that Use InstallShield Install Packager
Current Version: BorderManager 3.6
15 Jan 2004 Update: Tim Wohlford has suggested we change the title of this article to better communicate its value. As he said, "What this article is about (and should be titled to reflect) is how to push out an app that uses InstallShield install packager. This would help tons of people who struggle trying to "snappshot" such installs (when they could do a batch file, calling a response file instead)." Good suggestion, Tim. Your wish is our command.
This is important info and is currently kind of hard to find in the body of a README. So here it is, for your reading and printing pleasure. (No doubt it will be part of the shipping docs in NBM 3.7, coming soon.)
This version of the VPN client supports the silent install feature which allows the installation to be completed without user input. If the Dial-Up option is selected, some user intervention may be required if the workstation does not have the Dial-Up Networking or RAS components already installed.
To use this feature, you run setup.exe with a switch to create a response file which contains the answers to all the questions normally asked during installation. Since this includes selection of the dial-up client, the LAN client, or both, you may need to create multiple response files based on user needs.
After creating the response file, you can then run setup.exe with a different switch to use the response file so that installation requires minimal user intervention. There is also a switch to generate a log file for the silent install. This can be used to verify that the install completed successfully, or to diagnose why the installation failed. Examples on how to use these switches are shown below.
Often you may need to do a "silent install" on workstations that have different versions of Windows. If Windows or the NetWare Client were installed from CD-ROM, then the VPN client install will ask for those installation CDs. In this situation, since the responses to the install prompts will depend on the version of Windows that is installed, it is best to create a response file that will query the user for these installation CDs if needed.
Create Response File
To create this kind of a response file, follow these steps:
- Perform a normal install of the VPN client without creating the response file. This installation may ask for the Windows and / or NetWare Client CDs. Proceed normally through the installation.
- After rebooting, run setup.exe again, this time creating the response file. This re-install will not query for the Windows or NetWare Client install CDs, so the response file generated will not know what to answer when the user installation asks for the Windows or NetWare Client CD. Since there is no answer in the response file, the user will be queried for the Windows or NetWare Client CDs if they are needed.
To verify that the response file is working properly, run the installation in silent mode on a workstation that does not have VPN client installed. The install log file should show ResultCode=0.
The silent install feature only works with the Setup.exe under the disk1 directory. It does not work with the self-extracting executable SetupEx.exe. The silent install feature is enabled by executing Setup.exe under the disk1 directory with certain command-line options. The available options for Setup.exe are:
- -r - Run the installation and capture the responses in a file.
- -s - Run the installation in silent mode.
Depending on which of the two options is being used, the -f1 and -f2 options may be used to specify names files as well.
Use Silent Install
To use the silent install feature, perform the following steps:
- Create a response file by issuing the following command from disk1
of the VPN client disks:
setup.exe -r -f1"<RESPONSE_FILE>"
where <RESPONSE_FILE> contains the absolute path and name of response file.
The -f1"<RESPONSE_FILE>" option may be omitted, in which case a response file named setup.iss is created in the Windows or WinNT directory.
setup.exe -r -f1"c:\test\setup.iss"
executes the installation and saves the input to c:\test\setup.iss.
NOTE: When using the -f1 and -f2 switches, do not put a space before the quote sign. For example: -f1 "filename" won't work. -f1"filename" will work.
- Execute the installation based on previously captured input by issuing
the following command from disk1 of the VPN client disks:
setup.exe -s -f1"<RESPONSE_FILE>" -f2"<LOG_FILE>"
where <RESPONSE_FILE> contains the absolute path and name of response file, and <LOG_FILE> contains the absolute path and name of log file.
setup.exe -s -f1"c:\winnt\response.txt" -f2".\setup.log"
executes the installation, taking input from response.txt in the c:\WinNT directory, and records the result in the file setup.log in the same directory as setup.exe.
- Verify that the silent install was successful by checking the contents of
setup.log. You should see a result section with the following:
A value of 0 for ResultCode indicates that installation was successful. A nonzero value indicates failure. The possible ResultCode values are:
-1 General error.
-2 Invalid mode.
-3 Required data not found in the Setup.iss file.
-4 Not enough memory available.
-5 File does not exist.
-6 Cannot write to the response file.
-7 Unable to write to the log file.
-8 Invalid path to the InstallShield Silent response file.
-9 Not a valid list type (string or number).
-10 Data type is invalid.
-11 Unknown error during setup.
-12 Dialog boxes are out of order.
-51 Cannot create the specified folder.
-52 Cannot access the specified file or folder.
-53 Invalid option selected.
The most common error code seen is -12 if an error occurs during the install. An error condition usually displays an error message dialog requiring user input, such as "Click OK" to acknowledge the error. Since the response would not be in the response file, the silent install process assumes that the response file has the dialogs out of order and hence reports error -12.
A batch file may be used to further automate the silent install process. For example, you could create the following install.bat in the disk1 subdirectory:
setup.exe -s -f1"c:\vpninst\disk1\response.txt" -f2"c:\temp\vpninst.log"
rem This assumes that the VPN client has been extracted to c:\vpninst.
rem It could be on a network drive, or somewhere else.
rem Don't put a space between -f1 and the quote sign. It won't work.
@echo If the VPN Login icon(s) show up on your desktop, reboot, and the @echo VPN client installation will be finished!
rem this pause is so that the user will actually see the @echoed note to reboot.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com