STDIN/STDOUT Redirection May Not Work If Started from a File Association (321788)



The information in this article applies to:

  • Microsoft Windows 2000 Server SP1
  • Microsoft Windows 2000 Server SP2
  • Microsoft Windows 2000 Server SP3
  • Microsoft Windows 2000 Advanced Server SP1
  • Microsoft Windows 2000 Advanced Server SP2
  • Microsoft Windows 2000 Advanced Server SP3
  • Microsoft Windows 2000 Professional SP1
  • Microsoft Windows 2000 Professional SP2
  • Microsoft Windows 2000 Professional SP3
  • Microsoft Windows XP Professional

This article was previously published under Q321788
IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

SYMPTOMS

Scripts that contain standard input (STDIN) and standard output (STDOUT) may not work correctly if you start the program from a command prompt and you use a file association to start the script.

RESOLUTION

Service Pack Information

To resolve this problem, obtain the latest service pack for Microsoft Windows 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

260910 How to Obtain the Latest Windows 2000 Service Pack

Hotfix Information

Windows 2000

A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Windows 2000 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time   Version        Size       File name
   ----------------------------------------------------------
   23-Jul-2002  14:41  5.0.3502.5962  2,353,424  Shell32.dll      
   21-Jun-2002  14:09  5.2.2.10           3,584  Spmsg.dll        
   21-Jun-2002  14:10  5.2.2.10          44,544  Spuninst.exe     
   13-Jun-2001  02:05  5.0.2195.3727      3,856  Svcpack1.dll     
   21-Jun-2002  14:10  5.2.2.10          10,240  Spcustom.dll     
				

Using the New Registry Value

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

  1. Start Registry Editor.
  2. Locate and then click the following key in the registry:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

  3. On the Edit menu, click Add Value, and then add the following registry value:

    Value name: InheritConsoleHandles
    Data type: REG_DWORD
    Radix: Decimal
    Value data: 1

  4. Quit Registry Editor.
When you install the hotfix, the registry key is added automatically.

Windows XP

To resolve this problem, obtain the latest service pack for Windows XP. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

322389 How to Obtain the Latest Windows XP Service Pack

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft Windows 2000 Service Pack 4. This problem was first corrected in Windows XP Service Pack 1.

MORE INFORMATION

This problem has occurred with Perl scripts that are started by using a file association. Stdin and stdout are batch commands that redirect standard input/output.

For additional information about how to obtain a hotfix for Windows 2000 Datacenter Server, click the article number below to view the article in the Microsoft Knowledge Base:

265173 The Datacenter Program and Windows 2000 Datacenter Server Product


Modification Type:MinorLast Reviewed:10/5/2005
Keywords:kbHotfixServer kbQFE kbWin2kSP4fix kbbug kbfix kbOSWin2000fix kbshell kbWin2000preSP4Fix kbWinXPsp1fix KB321788