If you ever need to repair those file associations again, have a look at the tutorial below
How to fix .bat and .cmd files to execute when double clicking (opening)
I managed to munge up my system so that when I double clicked a windows command file (.bat or .cmd), it launched an editor instead of executing the file. I tried to fix this using the 'Default Programs' control panel item, but simply changing the associated program to 'cmd.exe' didn't do it. I've seen some items on other sites that indicate that I need to edit my registry entries to fix this, but I'm not certain that the entries I've found apply to my specific OS. I'm running Windows 7 Professional 64-bit. What do I need to do?
Windows for home | Previous Windows versions | Files, folders, and storage
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
-
Anonymous
2010-12-14T22:42:54+00:00
Answer accepted by question author
-
Anonymous
2010-12-14T02:57:27+00:00 BTW, I was ultimately able to fix this by reverting to an earlier system restore point. It was a bit of a PIA since I had to re-install some other software and re-do some system configuration changes I've made recently that caused problems with the reversion, but it ultimately did the job.
Dave
3 additional answers
Sort by: Most helpful
-
Anonymous
2010-12-13T15:31:00+00:00 Thanks for responding, Srinivas. In response to your questions:
- All .bat and .cmd files are affected. I believe that the problem originated by my opening a batch file to edit and inadvertently picking 'always open with'. This option is not usually available for batch files, but I right-clicked and opened it from within a winzip archive (winzip 11), and apparently the same protections are not in place from winzip.
- I can execute the files from a command prompt
- Double clicking works from other accounts on my computer
Regarding the fix proposed on the link you give me (creating a new account and copying the files from the old to the new), this is not practical-- the account I am using belongs to a domain in my company. I do not have the privileges to create an account in that domain, and if I did I would not be logging in with the same privileges I would need to access remote files. Can you provide a directed fix that would re-enable the double clicking for my current account? It seems like this is functionality that is missing in Win 7-- and searching around indicates that it was formerly available in XP.
Thanks for your help,
Dave
-
Anonymous
2010-12-14T17:11:57+00:00 Hi Dave,
We are glad to hear that the issue has been resolved by performing a system restore and I thank for provinding the information, since it might help other users with similar issue. Please feel free to contact us back, in case you face any other issues in future.
Thanks and Regards,
Srinivas R
Microsoft Support.
Visit our Microsoft Answers Feedback Forum and let us know what you think.
-
Anonymous
2010-12-11T15:54:38+00:00 Hi DSticker,
- Does this happen with all the .bat files or any particular one?
Step 1
I would suggest you to boot the computer in safe mode and try to execute the .bat file and check if it executes using command prompt. To boot to the desktop in safe mode keep tapping F8 key during restart. Once you see the option to boot in safe mode select it and press enter.
Access the link to know more about how to boot the computer in safe mode:
http://windows.microsoft.com/en-US/windows7/Start-your-computer-in-safe-mode
Step 2
If you cannot execute the .bat file and if it still launches an editor, you may try to create a new user account on your computer and try to execute it and check.
To create a new user account, follow the steps below:
a. Open User Accounts by clicking the Start button, clicking Control Panel, clicking User Accounts and Family Safety
(or clicking User Accounts, if you are connected to a network domain), and then clicking User Accounts.
b. Click Manage another account. Administrator permission required. If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
c. Click Create a new account.
d. Type the name you want to give the user account, click an account type, and then click Create Account.
If it works fine in the new user account, you may access the link and follow the steps to Fix corrupt user profile:
http://windows.microsoft.com/en-US/Windows7/Fix-a-corrupted-user-profile
Hope this helps. Let us know the result.
Thanks and Regards,
Srinivas R
Microsoft Support.
Visit our Microsoft Answers Feedback Forum and let us know what you think