I managed to get my little script working, it will check a process of a remote system, and save the result in a text file. How do I pass a variable to that script? Anything I do just crashes the script...
Code: Select all
VBSTART
Function GetIn()
Dim WshShell, oExec, input
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("sc.exe \\target_workstation query LIveUpdate")
input = ""
Do While True
If Not oExec.StdOut.AtEndOfStream Then
input = input & oExec.StdOut.Read(1)
If oExec.StdOut.AtEndOfStream Then Exit Do
End If
Loop
GetIn = input
End Function
VBEND
let>target_workstation=10.10.10.4
vbeval>GetIn(),result
writeln>c:\temp\output.txt,wres,%result%
I can just have the line written to a batch file, then use MS to run the batch file, but produces it's own problems.
Any ideas?
[/code]