The "CScript //H" or "WScript //H" command may not work as expected on a Windows XP-based computer after you install or uninstall Windows XP Service Pack 3

Article translations Article translations
Article ID: 952033 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

When you use the CScript //H or WScript //H command to change the default script host on a Windows XP-based computer, the operation may not work as expected. For example, if you use the CScript //H:CScript command, WScript is set as the default script host instead of CScript.

You may experience this issue in the following scenarios.

Scenario 1

On a Windows XP Service Pack 2 (SP2)-based computer, you change the default script host to CScript. Then, you install Windows XP Service Pack 3 (SP3). However, when you try to change the default script host again, you experience this issue.

Scenario 2

On a Windows XP SP3-based computer, you change the default script host to CScript. Then, you uninstall Windows XP SP3. However, when you try to change the default script host again, you experience this issue.

Note This issue occurs only if the default script host is changed to CScript before you install or uninstall Windows XP SP3.

CAUSE

Windows XP SP3 installs Windows Script Host (WSH) 5.7. The mechanism to change the default script host in WSH 5.7 differs from the corresponding mechanism in WSH 5.6. Because of this difference, you experience this issue when Windows XP SP3 is installed or uninstalled.

Note Windows XP SP2 installs WSH 5.6.

WORKAROUND

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
To work around this issue, follow these steps one time for each script file name extension with which you experience this issue. For example, if you experience this issue with the .vbs file name extension, follow these steps:
  1. Click Start, and then click Run.
  2. Type regedit in the Open box, and then press ENTER.
  3. Locate and then click the following registry subkey:
    HKEY_CLASSES_ROOT\.vbs
  4. Notice that the default value is VBSFile.
  5. If you experience this issue after you install Windows XP SP3, follow these steps. (If you experience this issue after you uninstall Windows XP SP3, go to step 6.)
    1. Locate and then click the following registry subkey:
      HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command
    2. In the details pane, double-click the Default registry entry, type the following in the Value data box, and then click OK:
      %SystemRoot%\System32\WScript.exe "%1" %*
    3. Locate and then click the following registry subkey:
      HKEY_CLASSES_ROOT\VBSFile\Shell\Open2\Command
    4. In the details pane, double-click the Default registry entry, type the following in the Value data box, and then click OK:
      %SystemRoot%\System32\CScript.exe "%1" %*
  6. If you experience this issue after you uninstall Windows XP SP3, follow these steps:
    1. Locate and then click the following registry subkey:
      HKEY_CLASSES_ROOT\VBSFile\Shell
    2. In the details pane, double-click the Default registry entry.
    3. In the Value data box, type Open, and then click OK.

Properties

Article ID: 952033 - Last Review: May 6, 2008 - Revision: 3.1
APPLIES TO
  • Microsoft Windows XP Service Pack 3, when used with:
    • Microsoft Windows XP Professional
    • Microsoft Windows XP Home Edition
Keywords: 
kbexpertiseadvanced kbtshoot kbprb KB952033

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com