I have a .Net Windows service. I want to create an installer to install that windows service.
Basically, it has to do the following:
- Pack
installutil.exe(Is it required?) - Run
installutil.exeMyService.exe - Start MyService
Also, I want to provide an uninstaller which runs the following command:
installutil.exe /u MyService.exe
How to do these using Inno Setup?
You don’t need
installutil.exeand probably you don’t even have rights to redistribute it.Here is the way I’m doing it in my application:
Basically you can have your service to install/uninstall on its own by using
ManagedInstallerClassas shown in my example.Then it’s just matter of adding into your InnoSetup script something like this: