Windows 8 64-bit. The user I'm logged in as has admin rights. When I open a cmd windows the window title even says "Administrator: cmd.exe".
So, I set my .bat file association to have the .bat file opened in Notepad++, and now I can't set it back to run the bat file when I double click on it. I've tried several web pages which told me to edit the registry to no avail.
When I do try to merge a .reg file into my PC, I get an error "You do not have permissions" or something. My user is not "administrator" but my user "chuck" does have admin rights. It always has.
-
I tried this method, the .reg file merged without error this time, but when I double click on a .bat file it still opens in Notepad++. I downloaded the file to change the .bat file assoc only. Do I have to restart the PC?
-
I also tried making the registry edits here: click here. It didn't work either.
-
The .bat file extension cannot be changed in the Associate File Extension with a Program in the Control panel. When I try to associate cmd.exe with a .bat file I get an error like "You cannot associate that program with this file."
-
I found this link but there is no .bat file entry under FileExts. Also on this link I have no no UserChoice key to delete for
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat\UserChoice
. -
Rebooted PC, I still have the same problem. I will make sure Notepad++ is not restoring associations with itself each time it runs. EDIT: As far as NPP preferences are concerned, it does not register .bat files.
Any more ideas? I have been dealing with this for 3 months off and on now.
NOTE: Some fixes for this problem work on Windows 7 but DO NOT work on Windows 8.
UPDATE: Fixed it. I had to
- Make a shortcut to regedt32.exe on my desktop.
- Right click shortcut and do "Run As Administrator", even though my user has admin rights.
- Search the whole registry for the string "notepad" whereon I found the sneaky little thing here:
HKEY_CURRENT_USER\Software\Microsoft\Windows\\**Roaming**\OpenWith\FileExts\\.bat
and deleted theUserChoice
item. - Reboot windows.
Best Answer
I have the same problem on Windows 10. I solved it by following the steps below.
search for '.bat', specifying that whole field must be the same. on my computer it happens to be at: \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.bat
verify that there is a 'UserChoice', which specifies the editor or whatever you specified.
Now double click on any .bat file and it should run.
I did not need to restart my PC, which runs Windows 10.