DOCUMENT:Q153163 17-DEC-2000 [win95x] TITLE :Using MS-DOS Environment Variable as Command-Line Option PRODUCT :Microsoft Windows 95.x Retail Product PROD/VER:95 OPER/SYS: KEYWORDS:win95 ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Windows 95 ------------------------------------------------------------------------------- SYMPTOMS ======== When you use an MS-DOS environment variable (such as %VARIABLE%) as a command-line option when you run a program (such as Notepad), you may receive the following message: Cannot find the %VARIABLE%.txt file. Do you want to create a new file? CAUSE ===== Windows 95 interprets the environment variable as a file name because the percent (%) character is a valid character in a long file name in Windows 95. RESOLUTION ========== To work around this behavior, use any of the following methods: - Use the following method to start the program: 1. Click the Start button, and then click Run. 2. Type the following command in the Open box command.com /c %% where is the program you want to run and is the environment variable you want to use. - Create an MS-DOS batch file that starts the program with the command- line variable set to the appropriate MS-DOS environment variable. Then, create a shortcut to the batch file and use the shortcut to start the program. - Start an MS-DOS session and type the command at the command prompt. ====================================================================== Keywords : win95 Technology : kbWin95search kbZNotKeyword3 Version : 95 ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2000.