Article ID: 811528 - Last Review: September 23, 2011 - Revision: 5.0 Command Prompt (Cmd.exe) Runs Files That Do Not Have Executable File Name Extensions
SYMPTOMSWhen 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. CAUSEThis issue may occur if the following conditions exist:
WORKAROUNDOpen the file by using Windows Explorer, or use the
following command line to open the file in the appropriate program: program
filename.ext For example, to open Filename.txt in Notepad, use the following
command line:notepad
filename.txt MORE INFORMATIONSome 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. REFERENCES For additional information
about computer viruses, click the following article number to view the article
in the Microsoft Knowledge Base: 129972
(http://support.microsoft.com/kb/129972/EN-US/
)
Description of Computer Viruses
For additional information about MIME-type
detection, visit the following Microsoft Web site: http://msdn2.microsoft.com/en-us/library/ms775147.aspx
(http://msdn2.microsoft.com/en-us/library/ms775147.aspx)
For additional information about the CreateProcess function, visit the following Microsoft Web site:http://msdn2.microsoft.com/en-us/library/ms682425.aspx
(http://msdn2.microsoft.com/en-us/library/ms682425.aspx)
APPLIES TO
| Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top
