0
votes

I having 3 .exe files (1.exe, 2.exe and 3.exe) and 2 .msi files (1.msi and 2.msi). Using NSIS script I created a Package. By installing that package this service should be in Windows services window. But I do not know the script to register this service. Help me thanks.

Actually I used Exec '"C:\Windows\System32\sc.exe" "MY Service Name"' Even though I couldn’t find my service in this path Start Menu -> Control Panel -> Administrative Tools -> Services. Help me...

2
Do not ask the same question multiple times. You can edit your previous question to add additional information, like the exec command shown here. - Seki
BTW, when posting commands, copy / paste the exact syntax, as bare sc "my service name" is not a correct syntax - Seki
okay seki.. then the correct syntax??? - Sujeeth Damodharan
If I understand what you write, your nsis installer is deploying several .exe and other setups, and one of them must be configured as a service, and your sc call fails for some reason. Please show what you tried (the whole Exec line from the nsis script), so we can try to correct it. It might also be another problem, but for now we cannot tell. - Seki

2 Answers

1
votes

have you tried NsSCM or any other service plug-in from the wiki?

0
votes

Use SERVICE plugin ( ServiceLib ) from here: http://nsis.sourceforge.net/NSIS_Service_Lib

Does the job well! ;)