I have the following within a script which has been tweaked a bit for here
Sub install_app
Wscript.Echo (err.number)
strAppCmd = c:\windows\notepad.exe
call objShell.Run (strAppCMD, 7, True)
Wscript.Echo (err.number)
End Sub
I get 0 then 0 but If I rename notepad the script bombs out rather than give me the error within the script that I can handle, if I add on error resume next it just finishes.
How can I get it to handle the errors?
Sub install_app
Wscript.Echo (err.number)
strAppCmd = c:\windows\notepad.exe
call objShell.Run (strAppCMD, 7, True)
Wscript.Echo (err.number)
End Sub
I get 0 then 0 but If I rename notepad the script bombs out rather than give me the error within the script that I can handle, if I add on error resume next it just finishes.
How can I get it to handle the errors?