Archive: nsExec


nsExec
I am stopping services. Originally I was using Exec "net stop $\"$servicename$\"" but then I learned about nsExec. I really like the nsExec::ExecToLog feature but when stopping services that have a dependency such as:
X services depends on Y service, do you want to stop X service as well[Y/N]?
Normally I'd want it to say yes or Y but instead it says input not recognized so no services are stopped which leaves me with only Exec where it would properly be handled.

Is there a way to use nsExec to properly handly input such as always input "Y" when prompted or something like that?
SAM


Take a look at the ExecDos plugin. It allows you to specify a string for stdin.


If you only have to control services, you might want to have a look at the Simple Service Plugin:
http://nsis.sourceforge.net/NSIS_Simple_Service_Plugin
SimpleSC::StopService will stop dependant services as well.