En Windows XP, utilicé este script de este sitio web para que funcione . Primero debe realizar estas funciones de registro y colocar el script .vbs en su directorio C: \ Archivos de programa \ notepad ++,
'// USAGE
'// 1)
'// Navigate to registry key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\
'//
'// 2)
'// Add new subkey with the name of the executable you want replaced (no path) e.g. notepad.exe
'// This step is what tells windows to use the replacement exe, to undo simply delete the key you created
'//
'// 3)
'// Create new Sting Value called Debugger
'//
'// 4)
'// Modify value and enter wscript.exe "path to this vbs" e.g. wscript.exe "C:\Program Files\notepad++\npp.vbs"
'//
Aquí está el VBScript:
Option Explicit
'// Declare variables
Dim x ' old bad habit, I use this for general temporary variables
Dim W ' This will be the WSHShell object
Dim sCmd ' This will be the command to run
'// Create WSHShell object
Set W = CreateObject("WScript.Shell")
'// Set the working directory to the one this script resides in
'// If the target program doesn't care where it is run from then you don't need the following line
W.CurrentDirectory = LeftB(WScript.ScriptFullName, LenB(WScript.ScriptFullName) - LenB(WScript.ScriptName))
'// Set the target executable
sCmd = "notepad++.exe"
'// Skip the first argument but grab all the rest
If WScript.Arguments.Count > 1 Then
For x = 1 To WScript.Arguments.Count - 1
'// If the argument contains a space then enclose it with ""
If InStrB(WScript.Arguments(x), " ") Then
sCmd = sCmd & " """ & WScript.Arguments(x) & """"
Else
sCmd = sCmd & " " & WScript.Arguments(x)
End If
Next
End If
'// Run the command
'// The number after the command determines how the window should be initially (google WSHShell.Run)
'// The boolean at the end determines whether this script should run the target then exit or wait until the target exits
W.Run sCmd, 1, False