I have the following test InstallScript InstallShield code, which executes correctly in the normal interactive mode, but crashes setup.exe /s
(silent) mode on calls to ChangeDirectory that involve any sort of actual depth of directories.
//Note: "C:" ^ "temp" resolves to "C:\temp", but it never successfully
//executes when run silent mode. It works fine in interactive mode, however.
ChangeDirectory("C:" ^ "temp");
//No subsequent code gets executed at this point in silent mode
I'm running this on a Windows 2008 x64 Server in a command window with Administrator privileges. The c:\temp
directory exists, and EVERYONE
has been granted full control rights to it.
The exit code is -2147213312
, which is 0x80042000
in the error guide corresponding to
The installation exited with the abort keyword because the end user canceled the installation.
What could possibly be going on here? I've tried using the try/catch
syntax to examine the error, but the catch block never executes in this case, seemingly asserting that there's no error but instead an abort
called?
The Installscript Engine does a lot of stuff behind the scene. It keeps changing the working directory. Thus, it is not very reliable to use ChangeDirectory(). It is surely better to use FULL PATH to all executables and other files. LaunchAppAndWait() too has this trouble. So full path needs to be used without fail.
Further, the Installshield help for ChangeDirectory() clearly mentions the following:
When you are specifying a file in your script, always specify the full path (using the appropriate InstallShield system variable, for example, SRCDIR) rather than depend on the current folder having the appropriate value. The script internally executes code that can change the current folder, so its value may not be what you expect.
The thing is, results are not reliable. They may work or may not.
We get this errorcode when our recorded .iss file is missing an entry in the .iss response file.
See Creating the Response File for more Details.
Logging an installscript setup didn't give us much information, so we wrote some functions to write to a custom logfile which helped us a lot.
User contributions licensed under CC BY-SA 3.0