Much easier than manually associating all the .#
files, IMO, would be to set up a catch-all edit mode, using regedit:
HKEY_CLASSES_ROOT\*\shell
: Add Key = Notepad++
, set (Default)
= Edit with &Notepad++
HKEY_CLASSES_ROOT\*\shell\Notepad++
: Add Key = command
, set (Default)
to "c:\program files (x86)\notepad++\notepad++.exe" "%1"
-- use the correct path to notepad++.exe for your system, and make sure to have the double-quotes around both the path and the %1, to make sure spaces are handled correctly.
Log off and back on, or reboot. Now, on any file in explorer, you should be able to right-click, select Edit with Notepad++
, and voila!
Per-Extension Association (All Users)
Alternately, open up a cmd.exe
window (run-as-admin if necessary), and run
assoc .1=DotNumber
ftype DotNumber="c:\program files (x86)\notepad++\notepad++.exe" "%1"
for %n in (0 1 2 3 4 5 6 7 8 9) DO assoc .%n=DotNumber
If you want more .#
extensions, add them to the for loop. If you want to set them from a batch file (setdotn-assoc.bat
or setdotn-assoc.cmd
) rather than at the cmd.exe
prompt, need two %
rather than just one, everything else is the same:
assoc .1=DotNumber
ftype DotNumber="c:\program files (x86)\notepad++\notepad++.exe" "%1"
for %%n in (0 1 2 3 4 5 6 7 8 9) DO assoc .%%n=DotNumber
Per-Extension Association (Just for Current User)
If you're having problems with permissions on All Users, you can try this to do the per-extension association, but just for the current user.
In case you were able to create DotNumber type, ftype DotNumber=
to remove the existing definition.
Run the following from the command line (shouldn't even need an Administrator command line this time)
REG ADD HKCU\Software\Classes\DotNumber /ve /d "DotNumber File" /f
REG ADD HKCU\Software\Classes\DotNumber\Shell /ve /d "open" /f
REG ADD HKCU\Software\Classes\DotNumber\Shell\open /ve /d "open DotNumber file" /f
REG ADD HKCU\Software\Classes\DotNumber\Shell\open\command /ve /d "\"c:\program files (x86)\notepad++\notepad++.exe\" \"^%1\"" /f
FOR %n in (0 1 2 3 4 5 6 7 8 9) DO REG ADD HKCU\Software\Classes\.%n /ve /d "DotNumber" /f
And if you want to check if it was written
REG QUERY HKCU\Software\Classes\DotNumber /S
FOR %n in (0 1 2 3 4 5 6 7 8 9) DO REG QUERY HKCU\Software\Classes\.%n /S