Summary
This article discusses how to launch a .bat file from a setup with Installscript.Synopsis
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.
Discussion
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:
szProgram = "E:\\example.bat";
szCmdline = "";
LaunchApp (szProgram,szCmdline);
Additional Information
For more information on the LaunchApp function please reference the following HelpNet Article: LaunchApp
For an example on the LaunchApp function please reference the following HelpNet Article: LaunchApp Example
Related KB Articles
Q111515Related Articles
Launch a Batch File With Windows Installer 9Number of Views Launching a Batch File in Express 4Number of Views Launching a Batch File in Express 3Number of Views How to install lmgrd as service on Windows platfrom from a batch file or program? 3Number of Views CAB file extraction during ARL/batch data import operations may fail with "cannot create file" errors due to file locking 2Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago