sc create "My Server Name" binpath= "c:\program files\My server folder\My server.exe"In this case the path to My Server.exe is determined during the installation, so I added in this command in the [Run] section of my script:
Filename: sc.exe; parameters: "create """"My Server Name"""" binpath= {code:GetDataDir}\My Server.exe"; WorkingDir: {code:GetDataDir}; Components: sharedbut the service dose not get created. I don't get any error.