I want to be able to start/stop a service in windows. The service is a phone service that I have installed myself.
The problem I am having is that the service does not start or stop using the following snippet of code.
Starting:
Stopping;
ReadEnvStr $0 COMSPEC
nsExec::Exec '$0 net start PhoneService'
Pop $0
MessageBox MB_OK "$0"
The installation of the service went ok because you can see it in the services table, where it's set to auto. Hence, the need to stop/start.
nsExec::Exec '$0 net stop PhoneService'
Pop $0
MessageBox MB_OK "$0"
Any ideas?
Cheers