Hi,
I am not a pro, but I think you are right.
Code: Select all
272 ; Generic function for adding the context menu for one ext.
273 !macro AddContextMenuExt EXT
274 WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" $ContextMenuEntry_PlayWith
275 WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --started-from-file --no-playlist-enqueue "%1"'
276
277 WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" $ContextMenuEntry_AddToPlaylist
278 WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '$INSTDIR\vlc.exe --started-from-file --playlist-enqueue "%1"'
279 !macroend
280
281 !macro AddContextMenu EXT
282 Push $R0
283 ReadRegStr $R0 HKCR ${EXT} ""
284 !insertmacro AddContextMenuExt $R0
285 Pop $R0
286 !macroend
seems to be the code to include contextmenus and is only used at this point:
Code: Select all
606 Section $Name_Section07 SEC07
607 SectionIn 1 3
608 !insertmacro MacroAllExtensions AddContextMenu
609 !insertmacro AddContextMenuExt "Directory"
610 SectionEnd
to add contextmenus to "Directory" that should be fine, as you cannot define it better for dirs.
As there aren't any other calls, why are there context menus in the first place?
So there do the context menus really come from?
Well at this point MacroAllExtension AddContextMenu is also called which is doing what?
It's calling AddContextmenus to add the menus to all types of file, like my audiofiles.
So something has to be changed.
My guess would be that
Code: Select all
606 Section $Name_Section07 SEC07
607 SectionIn 1 3
608 !insertmacro MacroAllExtensions AddContextMenu
609 !insertmacro AddContextMenuExt "Directory"
610 SectionEnd
must be look a little bit more like it Extension counterpart
Code: Select all
558 SectionGroup /e !$Name_Section06 SEC05
559 SectionGroup $Name_SectionGroupAudio
560 !insertmacro MacroAudioExtensions RegisterExtensionSection
561 SectionGroupEnd
562 SectionGroup $Name_SectionGroupVideo
563 !insertmacro MacroVideoExtensions RegisterExtensionSection
564 SectionGroupEnd
565 SectionGroup $Name_SectionGroupOther
566 !insertmacro MacroOtherExtensions RegisterExtensionSection
567 SectionGroupEnd
568 SectionGroupEnd
But as I said, I have nothing to do this these macros or this language, so I might be wrong.