This article discusses how to launch a .bat file from a setup with Installscript.
This article discusses how to launch a .bat file from a setup with Installscript. The article applies to Basic MSI, InstallScript and InstallScript MSI Project Types.
A batch file can be launched much like a standard executable file. The InstallScript functions LaunchApp or LaunchAppAndWait or, beginning with InstallShield 2008, LaunchApplication can be used, and the batch file would be passed as the first parameter. An advantage of the LaunchApplication InstallScript function is that it provides additional parameters and, thus, more control; whereas, LaunchAppAndWait calls LaunchApplication internally with certain default parameters, such as LAAW_OPTION_WAIT, specified automatically.
For example, the LaunchApplication InstallScript function would allow the setup author to hide the window of the spawned process (i.e. hide the command prompt window when launching a batch file). An example of how launching a batch file might look in InstallScript is as follows: