In the [Run]
section of my script I want to run the net.exe
with the parameter start MyService
. The Flags
are:
waituntilterminated
runhidden
postinstall
If the setup is run explicitly as administrator with the "Run as administrator" option, the service gets started after the user hits "Finish".
If the setup is just double clicked (PrivilegesRequired
is set to admin
) the service doesn't get started.
This also happens with the sc.exe
What do I have to do, so that the service gets started at the end, no matter what the user did to run the setup?