I figured it out.... Thanks to the tip from guitarzan
If Not WScript.Arguments.Named.Exists("elevate") Then
CreateObject("Shell.Application").ShellExecute WScript.FullName _
, WScript.ScriptFullName & " /elevate", "", "runas", 1
WScript.Quit
End If
Set objFSO =...
Still get the same error
If Not WScript.Arguments.Named.Exists("elevate") Then
CreateObject("Shell.Application").ShellExecute WScript.FullName _
, WScript.ScriptFullName & " /elevate", "", "runas", 1
WScript.Quit
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
strUser =...
I have a script that renames a PC. The issue is, if I click OK or Cancel without entering any data. i get an error. I am not sure how to add error control for this. I would like it to just display the error that the PC was not renamed and close. Can anyone help?
If Not...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.