Created
September 30, 2021 22:23
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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