ID: Q131310
The information in this article applies to:
When using the FoxPro RUN command you may receive the error "Invalid Parameter" when trying to pass a parameter to the command that was trying to run.
This problem occurs only under Window NT (including version 3.51). It is evident when trying to use the MS-DOS copy command to redirect output to a network printer:
RUN COPY C:\CONFIG.SYS \\COMPUTER\PRINTER
The problem occurs because the file FOXRUN.PIF is pointing to the file
COMMAND.COM which is not a Windows NT valid command prompt file. This works
fine under Windows version 3.1 and Windows for Workgroups version 3.11.
To solve this problem, use the PIF Editor utility (PIFEDIT.EXE) located in the Main Group in the Program Manager to create a .PIF file that points to CMD.EXE, which is the Windows NT command prompt. The file is located in the SYSTEM32 directory (usually C:\WINNT\SYSTEM32\CMD.EXE). Then call the new .PIF file from FoxPro as in this example:
RUN /N MY.PIF /C COPY C:\CONFIG.SYS \\COMPUTER\PRINTER
1. Run the PIF Editor in the Main group.
2. Give CMD.EXE as the Program Filename.
3. Select or clear the "Close Window on Exit" check box to indicate whether
or not you want the MS-DOS session to close as soon as it finishes.
4. From File menu, choose Save As and give the .PIF file a name like MY.PIF
5. Copy the .PIF file to the FoxPro directory, and execute the RUN /N
command.
This behavior is by design.
Additional reference words: FoxWin 2.50 2.60 Invalid Parameter KBCategory: kbenv kbprb KBSubcategory: FxenvOs
Last Reviewed: June 27, 1995