I am fairly new using vbscript and I having a problem. I am writing a .asp pages that uses VBScript to gather the uptime on numerous servers. I cannot get the results of a WshShell.Run command to pass to a variable. I am not sure if this is even possible, but would appreciate the help?
Here is the command that I am using. I have already setup the array to read each server in and it is working fine, but this command doesn't work.
set WshShell = CreateObject("WScript.Shell"
set oUptime(count) = WshShell.run ("\\hqapp22\d$\scripts\uptime.exe" &srvr, 8,true)
I see the results pop-up in the command prompt window and then send the variable to a message box and only get "0" for my results.
Is this possible or am I just making a stupid mistake.
Thanks,
Don
Here is the command that I am using. I have already setup the array to read each server in and it is working fine, but this command doesn't work.
set WshShell = CreateObject("WScript.Shell"
set oUptime(count) = WshShell.run ("\\hqapp22\d$\scripts\uptime.exe" &srvr, 8,true)
I see the results pop-up in the command prompt window and then send the variable to a message box and only get "0" for my results.
Is this possible or am I just making a stupid mistake.
Thanks,
Don