Thursday, November 15, 2012 6:52 PM
Brand new install of Windows Server 2012.
Attempting to run "CScript //H:CScript" generates this error: CScript Error: Can't change default script host.
Attempted using Domain Administrator and local Administrator accounts, as well as elevated command prompt (run as administrator).
Running "WScript //H:CScript" generates the same error (Can't change default script host) in a Windows Script Host dialog.
HKCR\VBSFile\Shell\Open\Command = "%SystemRoot%\System32\WScript.exe" "%1" %*
HKCR\VBSFile\Shell\Open2\Command = "%SystemRoot%\System32\CScript.exe" "%1" %*
Why can't I change the default script host?
- Edited by desmondgc Monday, November 19, 2012 2:07 PM typo
Saturday, November 17, 2012 12:08 AMworks fine for me. Are you having the problem on any other 2012 installs?
Saturday, November 17, 2012 6:45 AM
On Sat, 17 Nov 2012 00:08:10 +0000, Tim Cerling wrote:
works fine for me.? Are you having the problem on any other 2012 installs?
I get the same results as Tim, I have no problem changing back and forth
between the two.
MVP - Forefront Identity Manager
Any program that runs right is obsolete.
Monday, November 19, 2012 2:21 PM
Issue was related to Python install on the server.
I ran ProcessMonitor to see where CScript was failing. It appears to scan the HKCR hive for file types / extensions, but would exit with error code 1 immediately after loading the .pys / pysFile keys. I am not sure whether it failed because of .pys or the "next" entry (.pyw) and am still not sure _why_ this caused it to fail. Uninstalling Python did not resolve the issue - had to reinstall Windows Server and set CScript default first before reinstalling Python.
This was never an issue on Windows Server 2008 or any previous version.
- Marked As Answer by desmondgc Monday, November 19, 2012 2:21 PM
Tuesday, November 20, 2012 2:22 AMModeratorThanks for sharing.