Local $answer = InputBox("Question", "Uptime for what Computer?", "", "", _
- 1, -1, Default, Default)
$boottime = '"Boot Time"'
Local $foo = Run (@ComSpec & " /k" & "systeminfo.exe /s" & " " & $answer & " | Find " & $boottime, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD )
Local $line
SplashTextOn ("Retrieving Information", "Please wait ...", 200, 100, -1, -1, 32, "Georgia", 10)
ProcessWaitClose ($foo)
SplashOff ()
While 1
$line = StdoutRead($foo)
If @error Then ExitLoop
MsgBox(0, "Success Return UpTime:", $answer & " Last " & $line )
Wend
While 1
$line = StderrRead($foo)
If @error Then ExitLoop
MsgBox(0, "Failure Return Uptime:", $answer & " " & "Computer cannot be found!")
Wend
I am wondering if someone could point me in the right direction as I cannot seem to just capture the first line of the run command output to a msgbox. There is the script and if you have questions please ask as I think I may need to re-write it to a text file first then append it from there.
- 1, -1, Default, Default)
$boottime = '"Boot Time"'
Local $foo = Run (@ComSpec & " /k" & "systeminfo.exe /s" & " " & $answer & " | Find " & $boottime, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD )
Local $line
SplashTextOn ("Retrieving Information", "Please wait ...", 200, 100, -1, -1, 32, "Georgia", 10)
ProcessWaitClose ($foo)
SplashOff ()
While 1
$line = StdoutRead($foo)
If @error Then ExitLoop
MsgBox(0, "Success Return UpTime:", $answer & " Last " & $line )
Wend
While 1
$line = StderrRead($foo)
If @error Then ExitLoop
MsgBox(0, "Failure Return Uptime:", $answer & " " & "Computer cannot be found!")
Wend
I am wondering if someone could point me in the right direction as I cannot seem to just capture the first line of the run command output to a msgbox. There is the script and if you have questions please ask as I think I may need to re-write it to a text file first then append it from there.