Windows XP में, मैंने इसे काम करने के लिए इस वेबसाइट से इस स्क्रिप्ट का उपयोग किया । आपको इन रजिस्ट्री कार्यों को करने की आवश्यकता है और .vbs स्क्रिप्ट को अपने C: \ Program Files \ 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"
'//
यहाँ 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