You can then parse the output of the command through the "Parse Text" action and depending on the results, figure out whether the command was successful or not.
There is another way to do that, which is far more complicated and I wouldn't recommend using it (unless there is a very good reason, and I cannot think of one at the moment). This method uses VBScript and WMI to start and stop the service. If you would like to see a sample implementation, I have attached a job that I created for a customer a long time ago.
This job will get a list of the services in the remote machine and prompt you to select which service you want to start/stop.
However, as I foretold, I would suggest using the sc command if it suits your needs.
Re: How can I use the stop/start service option on a remote ...
Well, it did work but I have stopped the service then I intend to run a routine of moving files around then I want to start the service again.
When I run the script the service stops fine but when I want to start the service nothing happens. I have cut out the start part of my script and it works fine on it's own but not when it's in the main script. does anyone else have this problem? is it a bug in winautomation?
To stop a service remotely you can use the command sc in the "Run DOS Command" action.
Example:
-> sc \\computer stop "Service Name"
-> sc \\computer start "Service Name"
You can then parse the output of the command through the "Parse Text" action and depending on the results, figure out whether the command was successful or not.
There is another way to do that, which is far more complicated and I wouldn't recommend using it (unless there is a very good reason, and I cannot think of one at the moment). This method uses VBScript and WMI to start and stop the service. If you would like to see a sample implementation, I have attached a job that I created for a customer a long time ago.
This job will get a list of the services in the remote machine and prompt you to select which service you want to start/stop.
However, as I foretold, I would suggest using the sc command if it suits your needs.
==Dedicated Automation Solutions==
==Dedicated Automation Solutions==