[run] Filename: {sys}\sc.exe; Parameters: "create mysrv start= auto binPath= ""{app}\mysrv.exe""" ; Flags: runhidden [UninstallRun] Filename: {sys}\sc.exe; Parameters: "stop mysrv" ; Flags: runhidden Filename: {sys}\sc.exe; Parameters: "delete mysrv" ; Flags: runhidden
References
http://stackoverflow.com/questions/16517974/inno-setup-installing-windows-services-using-sc-create