Wie ihr natürlich alle wisst, bin ich ein großer Fan des Open-Source-Editors Notepad++. Dieses Programm erfüllt einfach alle Wünsche, egal ob man nur schnell etwas notieren möchte oder doch ein etwas längeres Skript bearbeiten will.
Kurzum: Notepad, der Editor aus dem Standardlieferumfang von Windows hat ausgedient. Notepad++ sollte als Standardeditor eingerichtet werden. Doch wie? Hier wird erklärt, welche Dateien man ersetzen und welche Änderungen man an der Registry vornehmen müsste. Für alle, denen das zu aufwändig ist, habe ich ein kleines Skript für Windows XP geschrieben (ratet mal in welchem Programm ...), das die Bearbeitungen übernimmt:
@echo off
ECHO Looking for Notepad++Launcher named notepad.exe
DIR notepad.exe > NUL
IF NOT %ERRORLEVEL% == 0 (ECHO Please copy this file into your Notepad++ directory containing Notepad++Launcher
PAUSE
EXIT)
ECHO OK.
FOR /F "delims=#" %%a in ('cd') do (set nppath="%%a" )
ECHO Your current directory is %nppath%
ECHO Trying to prevent you from executing this file from network shares
IF %nppath%=="%windir%" (echo Wrong directory: You are at %windir%
ECHO Please copy this file into your Notepad++ directory containing Notepad++Launcher
PAUSE
exit)
ECHO OK
ECHO Trying to find out whether %nppath% does really exist
DIR %nppath%
IF NOT %ERRORLEVEL% == 0 (ECHO It seems that something went wrong, so I won't write into the registry. Please blame flominator AT gmx THEDOT net for this mess.
ECHO The path to Notepad++ seems not to be %nppath%
PAUSE
EXIT
)
ECHO OK
ECHO Writing the path into the registry
reg add HKLM\Software\Notepad++ /v "" /d %nppath% /f
ECHO .
ECHO Now copying notepad.exe to %windir%
copy notepad.exe %windir%
ECHO Now copying notepad.exe to %windir%\system32
copy notepad.exe %windir%\system32
ECHO Now copying notepad.exe to %windir%\dllcache
copy notepad.exe %windir%\system32\dllcache
pause
Gebrauchsanweisung
Einfach NPPLauncher herunterladen und zusammen mit obigem Batchskript als _replacenp.bat in den Installationsordner von Notepad++ packen.
Disclaimergedöhns
Natürlich übernehme ich keinerlei Haftung für eventuelles unvorhersehbares Fehlverhalten meines Skriptes. Falls es Probleme gibt, freue ich mich aber trotzdem über Feedback.
Viel Spaß damit!