|
|
#1 |
|
Member
Join Date: Jun 2002
Posts: 56
|
OT: registering a shell extension
i would like to register an EXTENSION-SPECIFIC shell extension to a right-click menu; namely, when one right-clicks on a .iso image i would like a 'burn image' option which would execute the app i want (cdrecord).
i traced around misc existing ones in my registry, but they all seem to reference specifically-named 'keys' like {1111-0000-AAAA-FFFF-DDDD}, so i'm a bit lost. i've got the sample listed below, but i don't know how to generate a UNIQUE key for any system. - edit: i got even further now, found i can use uuidgen or guidgen (wonder what the difference is) from the ms platform sdk to make these. is this my only way? would i have to include this in my installer, pipe the output to a file, read in the file, etc? REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.zzz] @ = "zzzfile" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\zzzfile] @ = "a zzz file" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\zzzfile\shellex\ ContextMenuHandlers\{11111...}] @ = "" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{11111...}] @ = "a zzz file" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{11111...}\InProcServer32] @ = "c:\\myshellextension.dll" "ThreadingModel" = "Apartment" [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ Shell Extensions\Approved] "{11111...}" = "a zzz file handler" |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Sep 2002
Location: At [4C69:6E6B]
Posts: 561
|
To create a file association, do the following in NSIS:
PHP Code:
Replace ".xxx" with the extention (don't forget the '.' in front of it) Replace "MyApp Document" by a title for the association. Replace "c:\LongPathname\Myapp.exe %1" by your program path (don't forget the '%1' after it, else the filename will not be passed trough to the program). To create an extra submenuitem, use this code: PHP Code:
- Claudia Pelsmaeker |
|
|
|
|
|
#3 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
You can also replace the "open" in "MyApp.Document\shell\open\command" to add more commands such as burn for example. NSIS does this (compile nsi script) so you can find an example in makensis.nsi.
If you want to create a more serious shell extension look at: http://www.codeproject.com/shell/shellextguideindex.asp NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Sep 2002
Location: At [4C69:6E6B]
Posts: 561
|
KiCHiK, you repeated me. The last two lines of my post said the same.
- Claudia Pelsmaeker |
|
|
|
|
|
#5 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
Oops
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#6 |
|
Member
Join Date: Jun 2002
Posts: 56
|
wow awesome!
is there a way to pipe commands in this? like blah blah blah blah %1;pause, to add a pause after it? i know i can use a batch file for that, but it seems a bit unclean |
|
|
|
|
|
#7 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
I don't think so. Windows does not support such a sophisticated command line parsing. You can write a little silent NSIS installer to do that. I wouldn't recommend on a batch file because it will open up a DOS window.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#8 |
|
Member
Join Date: Jun 2002
Posts: 56
|
ok what about the HKCR\*\shellex\ContextMenuHandlers? it looks like those require guids
this also makes me wonder how winamp2 has the right-click play/enqueue in winamp shell extensions without being present in this key |
|
|
|
|
|
#9 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
Those keys relate to more serious shell extension with sub menus, drag & drop suppport and more. The link I gave above is about those extensions.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|