I need to run a command as part of my build workflow. In particular, it is sc.exe with parameters such as this:
sc.exe \\computerName STOP "serviceName"
In the build workflow, can I just use the InvokeProcess operation to do this? I want to avoid batch files. Should I use InvokeProcess, and if so, should I provide the path to SC.exe. I would not think so, because this path is recognized regardless of the working directory (I think because its Windows executable).
Or should I do it another way?
source share