Microsoft KB Archive/129415

{|
 * width="100%"|

PRB: "Bad command or file name" Error When RC.EXE Not Found

 * }

Q129415

1.50 1.51 1.52 WINDOWS kbtool kbprb

-

The information in this article applies to:


 * Microsoft Visual C++ for Windows, 16-bit edition, versions 1.5, 1.51, 1.52

-

SYMPTOMS
The Visual Workbench is unable to run the resource compiler, RC.EXE. The output windows shows results similiar this:

  Compiling resources... Bad command or file name Compiling... &lt;drive&gt;:\&lt;path&gt;\&lt;filename&gt;.cpp Linking...  Binding resources... Bad command or file name Creating browser database... &lt;filename&gt;.EXE - 0 error(s), 0 warning(s)

In the two steps 'Compiling resources...' and 'Binding resources...', the "Bad command or file name" error indicates that RC.EXE was not found.

This occurs only when you run Visual C++ version 1.5x under Windows NT.

CAUSE
There is a problem with the AUTOEXEC.NT file that results in the removal of \BIN from the PATH environment variable, where is the directory in which Visual C++ is installed.

RESOLUTION
Remove or correct the PATH statement in the AUTOEXEC.NT file. If the existing PATH contains \BIN, you can remove the PATH statement from the AUTOEXEC.NT. If you want to add the existing PATH to the AUTOEXEC.NT, add %PATH% as the last item on the PATH environment variable in the AUTOEXEC.NT. Otherwise, add \BIN to the PATH in the AUTOEXEC.NT file.

NOTE: AUTOEXEC.NT is located in the \SYSTEM32 directory, where is the directory in which Windows NT is installed.

STATUS
This behavior is by design. The error message notifies you that RC.EXE was not found.

MORE INFORMATION
Most of the command line tools (compiler, linker, and so on) that ship with Visual C++ versions 1.5x are native Win32-based applications that use the DOSXNT DOS-extender to permit them to run under MS-DOS. In the Windows NT environment, they run as native 32-bit applications without the DOS-extender. RC.EXE is an exception, in that it is a 16-bit tool.

When RC.EXE is spawned by the development environment during a build, Windows NT determines that RC.EXE is an MS-DOS application and prepares to run an MS-DOS application. One of the steps in this preparation is to run the AUTOEXEC.NT batch file.

If \BIN is on the existing PATH, a PATH statement is in AUTOEXEC.NT, and neither \BIN nor %PATH% are part of that statement, then RC.EXE will not be found.

Additional query words: 1.50 3.50 3.51

Keywords : kb16bitonly

Issue type :

Technology : kbVCsearch kbAudDeveloper kbvc150 kbVC151 kbVC16bitSearch kbVC152