Hello all!
This is my first time trying to work with the reg.dll. There is a lot
to learn there! Could someone be so kind as to help me with these two
functions, and then I will catch on well enough.
Thanks a bushel.
;Add OpenWithNotepad to the Context Menu for all files
; ....@notepad(0) ->should install the reg
;....@notepad(1) ->should uninstall the reg
function Notepad(how)
static originalvalue = [get current value]
;am I right to think that "static" will hold the value in memory
until PP exits?
If (how == 0) or (how =="")do ;;install key
;CREATE THIS KEY
[HKEY_CLASSES_ROOT\*\shell\Open with Notepad\command]
@="notepad.exe %1"
ElseIf (how == 1)do ;;remove key
[-HKEY_CLASSES_ROOT\*\shell\Open with Notepad]
ElseIf (how == 2)do ;;restore original value
[restore originalvalue]
ElseIf (how == 3)do ;;change from Notepad to Notepad2
[change existing key value from @="notepad.exe %1" to
@="C:\Program Files\notepad2\notepad2.exe %1"
EndIf
quit