Problem solve Get help with specific problems with your technologies, process and projects.

A more elegant way to wait for InstallShield to terminate

Use the -SMS command line when using InstallShield.

This tip was submitted to the searchWin2000 Tip Exchange by member Michael Eaton. Let other users know how useful...

it is by rating the tip below.

A previously published tip explained that one could use TLIST.EXE in the Win2k Reskit to detect the end of an InstallShield execution. InstallShield is supposed to be hard to work with because it runs "in the background." The good news is that the actual problem is not so mysterious, and in many cases you can fix this without looping statements or external programs.

What is really going on under InstallShield's hood is that SETUP.EXE is not what does all the real work. SETUP.EXE actually spawns a child process with a name like "_INS5576._MP". Once this process is initiated, SETUP.EXE terminates. This early termination can monkeywrench your scripts in a heartbeat.


Fortunately, the good folk at InstallShield are fully aware of the complications that this can pose. Their solution can be summed up in four characters: -SMS. This is a command line argument for SETUP.EXE. Please note that "SMS" MUST be capitalized. The SMS here stands for Microsoft's Systems Management Server, used by many shops to handle desktop management and deployment issues. InstallShield fools SMS too, so they created the -SMS switch to compensate. When you pass this argument to SETUP.EXE, the executable will remain loaded in memory until all child processes have terminated and keeps any existing network connections open. Thus, InstallShield behaves the way you expect it to, and you can go back to scripting normally.

There is one caveat to this technique. It was designed specifically to support network driven installations, and so it is designed to work when SETUP.EXE is located on a Windows NT/2K network share. If you are scripting for a CD-ROM based installation, this switch may not be helpful to you. You'll just need to try it and see if you get the results you want.

Typically, the software developers themselves are far more familiar with InstallShield's innards than those of us who have to deploy with it. So for anyone dealing with InstallShield driven deployments, I would recommend this URL from the InstallShield knowledge base. It is an overview of all the command line switches for SETUP.EXE:

Dig Deeper on Windows systems and network management