Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Win32 - Dependant services

by Smaug (Pilgrim)
on Oct 21, 2004 at 14:34 UTC ( [id://401177]=note: print w/replies, xml ) Need Help??


in reply to Re: Win32 - Dependant services
in thread Win32 - Dependant services

Hi PJ,
Here is a possible solution using your command shell idea and the output from 'net stop'
use strict; my @order; my @results = `net stop mssqlserver /N`; foreach(@results){ if(/^ /){ push(@order,$_) } } foreach(reverse(@order)){ print("Stopping $_\n"); system("net stop \"$_\""); } #...... reverse to start again....

This is an initial hack. Any ideas for improvement are welcome!!
Bye!

Replies are listed 'Best First'.
Re^3: Win32 - Dependant services
by periapt (Hermit) on Oct 22, 2004 at 16:07 UTC

    Actually, this looks pretty good. I may try it myself. I haven't had the opportunity to take down my server lately so I haven't tested it but I like it.

    PJ
    use strict; use warnings; use diagnostics;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://401177]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-20 14:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found