Community Forums
Results 1 to 1 of 1

Thread: program to run a batch file that installs a windows service

  1. #1
    Join Date
    Sep 2016
    Posts
    2

    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.

    function OnBegin()
    NUMBER nResult;
    STRING szProgram, szParam;
    begin
    // 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 );
    end;
    Last edited by jimi2012; 09-01-2016 at 05:28 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •