system q[ net start "service name" ];
system q[ net stop "service name" ];
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] |
Thanks a lot BrowserUk for your solution.
I am able to get desired output succesfully with ur comments.
I would also like to enhance my this script.
I would now like to go to remote level, I mean to say I would like to Start / Stop service running on other machine, by running script on my desktop machine.
Can you please help me wayout?
| [reply] |
| [reply] |
Did you look at the help for the net command? Did you search google? Perhaps the sc command is also of interest. Note that sc comes as standard on xp, Windows 2003 (and I believe above), it may be on one of the resource CDs for windows 2000/NT4
Martin
| [reply] [d/l] [select] |
| [reply] |
Thnx Martin for replying.
Can you please provide me a small sample script?
| [reply] |
What code have you written and how does it fail for you?
Perlmonks is not a code writing service, so please show us what efforts you've made and where you encountered problems.
| [reply] |