
|
email this FAQ to a colleague
Q:
How do I change from CScript to WScript?
A:
To change from CScript to WScript requires changing some registry entires. Here some VBScript that will do that.
Set ShellObject = WScript.CreateObject ("WScript.Shell")
ShellObject.RegWrite "HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command\", "%WINDIR%\System32\wScript.exe //nologo ""%1"" %*", "REG_EXPAND_SZ"
ShellObject.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\VBSFile\Shell\Open\Command\", "%WINDIR%\System32\wScript.exe //nologo ""%1"" %*", "REG_EXPAND_SZ"
WScript.Echo "Successfully registered CScript"
- Wayne Berry
|