Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Validating that service is fully stopped in Windows

by dasgar (Deacon)
on Jul 02, 2013 at 20:27 UTC ( #1042100=note: print w/ replies, xml ) Need Help??


in reply to Validating that service is fully stopped in Windows

Since you're working with Windows, it may be easier to utilize some of the utilities from the Sysinternals suite of tools. PsService might end up showing you the same thing that Windows' service manager is showing. Another alternative is the PsList, which provides information about running processes. You can have your script just do a system call to utilize these utilities.

(NOTE: The first time you run one of the utilities from Sysinternals will have a GUI pop up dealing with the EULA. Subsequent times running the utilities does not encounter the EULA pop up.)


Comment on Re: Validating that service is fully stopped in Windows
Re^2: Validating that service is fully stopped in Windows (sysinternals eula)
by Anonymous Monk on Jul 02, 2013 at 20:43 UTC
    use File::Fetch; my $ff = File::Fetch->new(uri => 'http://live.sysinternals.com/psservi +ce.exe'); my $where = $ff->fetch( to => $ENV{TEMP} || $ENV{TMP} ) or die $ff->er +ror; system $where, qw{ -? -accepteula /accepteula } ) ; ## run for each us +er

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-09-24 02:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (244 votes), past polls