Jump to content

dos progs that output info - a less hoky approach?


gcue
 Share

Recommended Posts

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...