Article ID: 811528 - View products that this article applies to.
When you use a command prompt (Cmd.exe, or the Windows command processor) to open a file that does not have an executable file name extension, the file may run as a program instead of being opened in the program that is registered for the file type (based on the file name extension).
For example, if you type filename or filename.txt at a command prompt, Filename.txt may run as a program instead of being opened in Notepad. This may also occur if the file is called as a command line in a batch (.bat) file or in a Windows NT command script (.cmd) file.
This issue may occur if the following conditions exist:
Open the file by using Windows Explorer, or use the following command line to open the file in the appropriate program:
program filename.extFor example, to open Filename.txt in Notepad, use the following command line:
Some files contain viruses or can otherwise damage your computer. If you are not confident that a file is safe, take precautions such as these before you open the file:
Windows and Microsoft Internet Explorer perform additional checks before opening a file. This includes determining if any program is associated with the file name extension in the registry. This MIME-type detection permits Windows Explorer and Internet Explorer to find and start the object server or program that is associated with the file name extension.
For additional information about computer viruses, click the following article number to view the article in the Microsoft Knowledge Base:
129972For additional information about MIME-type detection, visit the following Microsoft Web site:
(https://support.microsoft.com/kb/129972/EN-US/ )Description of Computer Viruses
http://msdn2.microsoft.com/en-us/library/ms775147.aspxFor additional information about the CreateProcess function, visit the following Microsoft Web site:
Article ID: 811528 - Last Review: September 23, 2011 - Revision: 5.0