
|
email this FAQ to a colleague
Q:
How do I change from WScript to CScript.
A:
To change from WScript to CScript 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\cScript.exe //nologo ""%1"" %*", "REG_EXPAND_SZ"
ShellObject.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\VBSFile\Shell\Open\Command\", "%WINDIR%\System32\cScript.exe //nologo ""%1"" %*", "REG_EXPAND_SZ"
WScript.Echo "Successfully registered WScript"
- Wayne Berry
|