Nota: Revisa el directorio (notepadPath) donde tienes instalado el programa notepad++. En mi caso particular, notepad se encuentra en la siguiente ruta C:\Program Files (x86)\npp.7.2\
@echo off SET notepadPath=C:\Program Files (x86)\npp.7.2\notepad++.exe rem add it for all file types @reg add "HKEY_CLASSES_ROOT\*\shell\Open with notepad++" /t REG_SZ /v "" /d "Open with notepad++" /f @reg add "HKEY_CLASSES_ROOT\*\shell\Open with notepad++" /t REG_EXPAND_SZ /v "Icon" /d "%notepadPath%,0" /f @reg add "HKEY_CLASSES_ROOT\*\shell\Open with notepad++\command" /t REG_SZ /v "" /d "%notepadPath% %1" /f rem add it for folders @reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with notepad++" /t REG_SZ /v "" /d "Open with notepad++" /f @reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with notepad++" /t REG_EXPAND_SZ /v "Icon" /d "%notepadPath%,0" /f @reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with notepad++\command" /t REG_SZ /v "" /d "%notepadPath% %1" /f pause
A modo de ejemplo vamos a hacerlo lo mismo para Brackets, para ver que es aplicable para todos los programas.
@echo off SET st2Path=C:\Program Files (x86)\Brackets\Brackets.exe rem add it for all file types @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Brackets" /t REG_SZ /v "" /d "Open with Brackets" /f @reg add "HKEY_CLASSES_ROOT\*\shell\Open with Brackets" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f @reg add "HKEY_CLASSES_ROOT\*\shell\Open Brackets\command" /t REG_SZ /v "" /d "%st2Path% \"%1\"" /f rem add it for folders @reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Brackets" /t REG_SZ /v "" /d "Open with Brackets" /f @reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Brackets" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f @reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Brackets\command" /t REG_SZ /v "" /d "%st2Path% \"%1\"" /f pause