Cmd.exe Generates an Access Violation Error Message When it Runs Batch Files with File Redirection

Article translations Article translations
Article ID: 264824 - View products that this article applies to.
This article was previously published under Q264824
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

SYMPTOMS

When you run a batch (.bat) file or files that redirect output to a file, after a variable amount of time, Cmd.exe generates an access violation error message.

CAUSE

This problem can occur if the buffer calculation for the redirected file name is incorrect. When this happens, an overwrite in heap memory is generated, and the heap memory becomes damaged.

RESOLUTION

To resolve this problem, obtain the latest service pack for 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
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
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 usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

STATUS

This problem was first corrected in Windows 2000 Service Pack 2.

MORE INFORMATION

The batch file redirects echo commands to a file that is similar to this:

j1.bat contains a command that calls another batch file like this:

j2.bat >outputlog.log

Properties

Article ID: 264824 - Last Review: October 20, 2013 - Revision: 3.4
APPLIES TO
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Professional Edition
Keywords: 
kbnosurvey kbarchive kbhotfixserver kbqfe kbbug kbfix KB264824

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