program to run a batch file that installs a windows service
I write a function, and want it to execute a batch file, which executes two commands to install and start a windows service. "A Basic MSI Project" is used in my case.
Here are the steps I did:
1) Go to "Installation Designer", select "Behavior and Logic", select "InstallScript", select "File" under "InstallScript"
2) Right click file in step 1 and select "New script file"
3) edit the new Script file as follows
4) Compile/Build/Run the installer.
I could not see the batch file gets executed. Obviously, some steps are missed here. Can any one tell me how to debug/search whether the script get executed or not ?
It would be helpful if there is an sample.
STRING szProgram, szParam;
// Added in InstallShield 15 - Show an appropriate error message if
// -removeonly is specified and the product is not installed.
szProgram="...()\\Installer\\Utilities\\vCenterWSUtilities\\VIService-ApacheLicense\\InstallVIService.bat"; (within the batch file, it is one command "service.exe install")
szParam = "";
nResult = LaunchAppAndWait( szProgram, szParam, WAIT );
Last edited by jimi2012; 09-01-2016 at 05:28 PM.