Jump to content
Sign in to follow this  
gcue

dos progs that output info - a less hoky approach?

Recommended Posts

gcue

im using netsvc which can query services on a remote pc.

currently my script runs the software to query a service on remote machines and pipe the outs to a text file

i then use fileread and stringtrim to get the information i need

HOKY i know!! can anyone think of a more creative way of doing this?

$file = ("c:\temp\ut.txt")
RunWait(@ComSpec & ' /c netsvc "client32" \\' & GUICtrlRead($asset) & ' /query >' & $file)
$line = FileReadLine($file, 1)

$uptime = StringTrimLeft($line,11)
$uptime2 = StringTrimRight($uptime,14)
    
If $uptime2="pending start" Then

Share this post


Link to post
Share on other sites
herewasplato

Maybe StdoutRead.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
gcue

a very interesting function....

thanks!!!!!!!!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.