vbscript in WIndows 7 64 bit machine
03/04/2015 2812 views
I use the following script to make sure the error is not given while running a SCCM program. I am not able to use in a 64 bit machine. test.cmd has the command to execute the program.Can someone help ?
Dim WshShell, UIv
Set WshShell = Wscript.CreateObject("Wscript.Shell")
On Error Resume Next
UIv = "test.cmd"
If (Err.Number = 0) OR (Err.Number = 1605) Then
Set WshShell = Nothing
Community Chosen Answer
Please log in to answer
it´s working but better change the object declaration to
Set WshShell = CreateObject("Wscript.Shell")
but why do you put the command to execute the program in a command file and not in this vbs too.
WshShell.Run "%COMSPEC% /k ipconfig /all", 0, True
Answered 03/04/2015 by: aragorn.2003