View Full Version : Silent InstallScript Debugging

06-23-2004, 06:56 PM
I am having a problem with silently installing a InstallScript Project. The product completely installs, but the setup never truly exits. The task manager shows 2 instances of setup.exe remaining. I know that the setup is making it through the end of onFirstUiAfter, but I don't know what it is getting hung up on after that. The add/remove programs folder shows the product being installed, but when I click on 'remove', the project runs like it hasn't been installed.
So I have 2 questions.

1) What would cause a silent install to 'wait' instead of quitting? Has anyone had a similar problem with a silent install?

2) Is there anyway to use InstallScript debugger to debug a silent install? I've tried executing "setup.exe /d /s" but the setup never starts.

Any help would be appreciated

06-28-2004, 08:34 AM
Answer 1 most often seems to be caused by Setup displaying a progress message with SdShowMsg (..., TRUE). If this is not closed using SdShowMsg (..., FALSE), Setup waits. One solution to this is to enclose the SdShowMsg () in an if (MODE != SILENTMODE) then block. The other is to close it!

Answer 2 The InstallScript Debugger must be installed on the target machine or /d will be ignored. Look in the DS9 install directory tree for ISDbg.exe. Copy it onto the target machine (usually into Common Files\InstallShield\...) and then run it with /regserver to install it. You will also need access to your Script source files, but the debugger will prompt you if it can't find them.

You can also get the debugger to run in Maintenance Mode by adding /d to the UninstallString command line in the Registry.

Hope that helps,


06-29-2004, 03:02 PM
Thanks for the reply David. I looked through the project, and I wasn't closing the last SdShowMsg() like you mentioned. The install was hanging just like you said. Thank you for pointing this out.

As far as the debugging, I have already ran the ISDbg.exe and registered using the /regserver flag. I am able to debug the installations in non-silent mode, but I just don't know if it is possible to debug the silent install. I watch the processes and setup.exe starts, (actually two instances of setup.exe start) and then stops right away. The log file doesn't show any errors, but the installation never happenes.

Has anyone successfully debugged a silent install on a target machine?
If so, please let me know what steps you took to do so.

Thanks again David,

06-30-2004, 06:44 AM
I have no problems doing what you ask (see my earlier message). The only necessary setup tasks are copying the debugger and registering it on the target PC and arranging for the source files to be accessible. I do this by mapping drives from my test systems (mostly VMware virtual machines) back to the development system. If I map the same drive letter, the debugger can open the source files without asking me where they are.

The two SETUP.EXEs are normal. I think one of them does the skinning.

I don't know why yours is exiting in silent mode. Have you created a valid SETUP.ISS file and copied it into your kit directory?


06-30-2004, 11:58 AM
I have verified that the silent install works by itself, thanks to the whole SdShowMsg thing you mentioned. I have also verified that I can step through a normal install with the InstallScript debugger, after telling it where to look for setup.rul. This means that all the necessary source files are accessible by the debugger, and I have a valid setup.iss file. Maybe the debugger is quitting because it can't find setup.rul right away? It isn't prompting me for the location of the script file like it does in a non-silent debugged install.

You mentioned the debugger no longer asks to find the script files. Have you ever debugged a silent install when the setup.rul script file is not in the include path of the InstallScript debugger? Maybe this is the source of the problem. I'll try moving the script file to a location where the debugger can find it with out prompting me during a normal debug. I'll then test a silent install debug from there.

By the way, the original problem I had was solved by adding SdShowMsg(..., FALSE) at the end of the install. Now I am just curious about how to use the debugger in case I come across problems in the future.

Thanks for you help in the matter,

06-30-2004, 01:05 PM
> Have you ever debugged a silent install when the setup.rul
> script file is not in the include path of the InstallScript
> debugger?

Yes, but it's tedious to have to browse to the source location, so I always set up my test virtual machines with the correct drive mappings. I have to do the manual browse when I'm testing on real systems!

Apart from the visible Setup UI, there really isn't any difference between normal mode and silent mode. One area of complexity that I had to code around was forcing Setup to run in a particular mode (e.g. First Time Install) even when there was an older version of the package installed. I don't know if that could be your problem, but you'd get an error (probably -3) in your log file if that was the case.