“Open With” Window Appears When Opening Command Prompt
A question which I came across recently…
I go to Start, Run and type in "cmd", I get an Open With prompt window that asks me to Choose the program you want to use to open this file: File: cmd
I’ve used the "Browse" button to locate the Windows Command Processor, but I have to select it from the list of "Program." The "Always use the selected program to open this kind of file" check box is grayed out. I don’t even know why Windows has decided cmd is a file to be opened by an external application. This problem happens if there is a file named CMD in your profile folder, and Windows tries to execute it when you type CMD (without the .exe suffix, the file extension) in Start, Run dialog. Click Start, Run and type:
%comspec% /k dir "%userprofile%\cmd*" /s
Press {ENTER} This lists files within your profile directory which contain cmd in the file name . Spot the files which contain the names (CMD, CMD.EXE, CMD.COM, CMD.BAT) located within your user profile path and rename them or move them somewhere else. If those files appeared in your user profile folder without you doing anything, then it’s a good idea to run a thorough scan for Viruses and other Malware. When you type CMD in Start-Run dialog, Windows searches for the file in the following locations in the same order given, and executes the first one found:
- Your user profile folder
- Checks the App Paths registry key
- Searches all the folders included in the PATH variable
The search order may vary depending upon the Operating System you use, and the Service Pack level of your system. Note: The problem was fixed when the user removed a 0-byte file named cmd in his profile folder. If you run across a similar situation at some time, this blog entry should help.
Copyright © 2008 Ramesh Srinivasan. All rights reserved.
RELATED POSTS
- Automation Error When Starting the OpenWithAdd Utility
- Error “Windows Cannot Open the User Accounts Control Panel” When Opening User Accounts
- Games Explorer Link in the Vista Start Menu Does Not Work
- Open an Elevated Command Prompt From the Desktop Context Menu
- Zip Files Right-Click Warning - This Page Has an Unspecified Potential Security Risk
- Calendar Gadget in Windows Sidebar Is Blank With Orange Background
- Fix Windows Sidebar Does Not Start in Windows Vista
- Reset the Always Ask Before Opening This Type of File Setting
- Open Command Window Here - Make Available From Folder Tree
- How to Fix a Corrupted Recycle Bin in Windows Vista


Like this site? Make sure you