SMS Requirements for Unattended Installation and Deinstallation

A software setup or installation program used in the SMS environment must support unattended installation and deinstallation in the following ways:

Operate in unattended mode
It is mandatory that the program not require input from the user during the installation, removal, or maintenance of the application. Any information or options required by the setup program should be supplied by command-line switches to the program, or should be provided in a configuration file that is read by the program at run time or by some other means such as the Windows Registry.

Your application must not show any dialog boxes or windows during installation/deinstallation or maintenance. This is required for completely unattended installation/deinstallation using the Package Command Manager.

Do not force restart
Because multiple packages can be installed by SMS at one time, no individual package installation should force a restart as part of its installation program. Instead, the PCM has the capability of intercepting restart requests and queuing them up until all packages have been installed, offering the user the opportunity to save any work in progress before the restart.
Pass restart instructions to the PCM
To copy system files that may be in use, setup programs typically construct a batch file containing operations that must be performed during a restart, such as running an MS-DOS program by using ExitWindowsExec, and then restarting Windows.

In order to set up multiple programs before a restart, the PCM prevents the restart, and then performs an ExitWindowsExec when the user elects to do so.

To coordinate multiple unattended setups, concatenate the batch file of each setup program to the file _MSSETUP.BAT. If _MSSETUP.BAT does not exist, then rename the batch file of the first setup program to _MSSETUP.BAT and concatenate the batch files of additional setup programs to that file. Next, create an _MSRSTRT.EXE program to be executed by the PCM when it calls ExitWindowsExec. This MS-DOS program (_MSRSTRT.EXE) must execute the batch file _MSSETUP.BAT and then delete the batch file and itself.

After the installations are complete, if the PCM detects both _MSSETUP.BAT and _MSRSTRT.EXE in the Windows directory, it displays a dialog box prompting the user to exit Windows and restart. This dialog box does not interfere with subsequent installations.