Skip to content

Instantly share code, notes, and snippets.

@ChuckMichael
Created September 30, 2021 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChuckMichael/34241ef5e1c963d3dd89574f5e62fe7c to your computer and use it in GitHub Desktop.
Save ChuckMichael/34241ef5e1c963d3dd89574f5e62fe7c to your computer and use it in GitHub Desktop.
Batch script to open NppShell Settings where you can change text "Edit with Notepad++" to your own.
@echo off
@rem based on https://stackoverflow.com/questions/4051883/batch-script-how-to-check-for-admin-rights and https://github.com/notepad-plus-plus/notepad-plus-plus/issues/2444
goto check_Permissions
:check_Permissions
echo Administrative permissions required. Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
echo Success: Administrative permissions confirmed.
goto do_magic
) else (
echo Failure: Current permissions inadequate.
goto end
)
pause >nul
:do_magic
echo Opening NppShell Settings...
cd %ProgramFiles%\Notepad++
regsvr32 /i NppShell_06.dll
goto end
:end
echo It's end.
pause
exit /b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment