Das wäre eine Möglichkeit:
Delphi-Quellcode:
[Run]
Filename: {sys}\svc.exe; Parameters: /install /silent; WorkingDir: {sys}; Components: service
Filename: {sys}\net.exe; Parameters: start MyService; WorkingDir: {sys}; Components: service
[UninstallRun]
Filename: {sys}\net.exe; Parameters: stop MyService; WorkingDir: {sys}
Filename: {sys}\svc.exe; Parameters: /uninstall /silent; WorkingDir: {sys}