4

I want the installer to create a service. I usually do this manually just by running the command prompt as an Administrator and going to the location of the .bat file and typing

service.bat install

Is there a way to execute this batch file inside an installer? If so, how? What do I add to my script? The location of this service file is {the location of my installed app}\bin and inside there is this service.bat file that needs to be executed.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Roger Federer
  • 329
  • 2
  • 6
  • 12

1 Answers1

17

To execute a batch file in Inno Setup during installation, use the [Run] section entry:

[Run]
Filename: "{app}\bin\service.bat"; Parameters: "install"; Flags: runhidden
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992