Skip to content
⌘ NSIS Forum Archive

Right-click on any directory and have the menu include my program. How in NSIS?

2 posts

Nightmarez#

Right-click on any directory and have the menu include my program. How in NSIS?

I want to be able to open my program by right-clicking on any directory in Windows.. I know Winzip does this, how can I do it through NSIS on install?
kichik#edited
[edit]
This is also possible with this code if you just want to open your program:

WriteRegStr HKCR "Directory\\shell\\mycommand" "" "my command name"
WriteRegStr HKCR "Directory\\shell\\mycommand\\command" "" '"c:\\program files\\my program dir\\program to run.exe" %1' 
Your program will start with the right clicked directory as its command line parameter.
[/edit]

What you need to do is to write a shell extension.

Here is a good link that can help you get started:


What you can do with NSIS is to register the DLL, write the registry keys needed, and on uninstall remove those keys.