Microsoft KB Archive/251399

= BUG: Visual FoxPro FoxRun.pif Fails with Long File Names in NT/W2K =

Article ID: 251399

Article Last Modified on 5/10/2003

-

APPLIES TO

 Microsoft Visual FoxPro 3.0b Standard Edition, when used with:  Microsoft Windows 2000 Standard Edition

 Microsoft Windows NT 4.0  Microsoft Visual FoxPro 5.0 Standard Edition, when used with:  Microsoft Windows 2000 Standard Edition

 Microsoft Windows NT 4.0</li></ul> </li> Microsoft Visual FoxPro 5.0a, when used with:  Microsoft Windows 2000 Standard Edition</li></ul>

 Microsoft Windows NT 4.0</li></ul> </li> Microsoft Visual FoxPro 6.0 Professional Edition, when used with:  Microsoft Windows 2000 Standard Edition</li></ul>

 Microsoft Windows NT 4.0</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q251399

<div class="symptoms_section">

SYMPTOMS
If you try to use the !/Run command in Visual FoxPro on a Windows NT or Windows 2000 computer and the files are in Long File Name format, the execution fails with the following error:

To many parameters - Files

This also occurs if a batch file contains a Long File Name.

<div class="cause_section">

CAUSE
The FoxRun.pif file points to the wrong file. FoxRun.pif points to Command.com on NT or Windows 2000. Command.com is not a DOS 7+ version but rather a DOS 6 version, which produces errors with Long File Names. FoxRun.pif should point to the CMD.exe file.

<div class="resolution_section">

RESOLUTION

 * 1) Use the Windows Explorer to navigate to the FoxRun.pif file located in the Visual FoxPro home directory.
 * 2) Right-click and choose Properties.
 * 3) Select the Program tab.
 * 4) Change the Cmd line from: Command.com

to:

CMD.exe

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

<div class="moreinformation_section">

Steps to Reproduce Behavior
<ol> Create a batch file, such as d:\test.bat.</li>  Add the following line to the batch file: cd "d:\Program Files" </li> You may replace the preceding directory with any valid Long File Name path.</li> Type the following in the FoxPro Command window: RUN d:\test.bat

When you try to run the batch file from Visual FoxPro, you receive the following error message because Command.com does not understand the long file name d:\Program Files:

To many parameters - Files

</li></ol>

Keywords: kbbug kbnofix kbxbase KB251399

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.