View Full Version : Right-click shell extensions fail in Windows 7
Redsandro
27th May 2009, 16:21
In Windows XP I used to put a bunch of stuff in the registry so that I could right-click on files and open them in VirtualDub, DGIndex and a bunch of other apps that are just annoying if you have to open them first and then open the file.
For example:[HKEY_CLASSES_ROOT\AVIFile\shell\VirtualDub32]
@="VirtualDub"
[HKEY_CLASSES_ROOT\AVIFile\shell\VirtualDub32\command]
@="d:\\Software\\Video\\VirtualDub\\VirtualDub.exe \"%1\""
[HKEY_CLASSES_ROOT\.avi\shell\VirtualDub32]
@="VirtualDub"
[HKEY_CLASSES_ROOT\.avi\shell\VirtualDub32\command]
@="d:\\Software\\Video\\VirtualDub\\VirtualDub.exe \"%1\""
Yeah I put it in twice because I never know what extension is used in the registry. Anyway, I can't get this to work in Windows 7. No matter how many extensions I try. Other apps seem to be capable of changing the right-click menu. Why can't I do it manually?
BTW this same method still does work in Windows 7 for Directory and *
stax76
23rd June 2009, 23:24
There is a alternative way using a shell extension, maybe you or somebody else is interested, it's called Open++ and can be found here:
http://www.essential-freebies.de/board/viewtopic.php?t=770&highlight=context+menu
Redsandro
23rd June 2009, 23:35
Thanks for that.
Direct link for those that don't speak german (http://www.freewebs.com/dengdun/en/openxx.htm)
Although I would like to know a fix for the manual method. I just open stuff in programs, and if I choose "open with" each time I want a new program, they remain in the 1-level-deep submenu "open with" just the same.
stax76
24th June 2009, 00:02
Good thing about shell extensions is you don't lose all the customizations moving to a fresh installed system as all settings are stored in a central place like a XML file. There are two alternative shell extension similar to Open++, one that I don't remember it's name and one I've coded myself, it supports toplevel menu + sub menu. problem with it is however it's .NET so the .NET runtime is loaded permanently into the explorer process and even in every application that uses the extension for instance with the open/save file dialog. On top of that potentially different shell extensions might require different .NET runtimes and since a process can only host a single runtime shell extensions should never be programmed with .NET. Maybe the Open++ author knows the name of alternatives or maybe he adds toplevel menu support if requested, I use toplevel menus a lot.
Redsandro
25th June 2009, 16:25
I don't get it, I've removed or renamed pretty much every shell handler and WMP11.AssocFile.AVI reference from the registry, and it still gives me the Add to Windows Media Player list and Play with Windows Media Player options on rightclick on AVI.
Looks like
HKEY_CLASSES_ROOT\.avi references
@=WMP11.AssocFile.AVI
But
HKEY_CLASSES_ROOT\WMP11.AssocFile.AVI
cannot be removed.
So I renamed the reference in .avi to AVIFile, which contains a lot of other data, but shell/command still won't come through, even though I've put them in all keys that might have to do something with it.
I also removed:
HKEY_USERS\S-1-5-21-(big number)\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.avi\OpenWithProgids
backup=WMP11.AssocFile.AVI
AVIFile=zero-length binary value
WMP11.AssocFile.AVI=zero-length binary value
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Multimedia\WMPlayer\Extensions\.avi
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Multimedia\WMPlayer\Extensions\.avi
SPDHandler = WMP11.AssocFile.AVI
Keys that cannot be changed (even in Admin mode):
HKEY_CLASSES_ROOT\WMP11.AssocFile.AVI
HKEY_CLASSES_ROOT\CLSID\{CD3AFA88-B84F-48F0-9393-7EDC34128127}\ProgID @=WMP11.AssocFile.AVI
HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{CD3AFA88-B84F-48F0-9393-7EDC34128127}\ProgID @=WMP11.AssocFile.AVI
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{CD3AFA88-B84F-48F0-9393-7EDC34128127}\ProgID @=WMP11.AssocFile.AVI
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{CD3AFA88-B84F-48F0-9393-7EDC34128127}\ProgID @=WMP11.AssocFile.AVI
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Classes\CLSID\{CD3AFA88-B84F-48F0-9393-7EDC34128127}\ProgID @=WMP11.AssocFile.AVI
They've been working on a maze with Win7, but why are there all there WMP11 values with play and enqueue commands if it doesn't even matter when you remove them?
I hope it must be unlockable somehow.
-edit-
btw, both those Open++ downloads are offline. I cannot find mirrors on google. I was curious as to how big it is (filesize). If I really cannot figure this out, maybe it's an alternative to Open With... because like you say, configuration is more portable.
stax76
25th June 2009, 17:52
I don't get it, I've removed or renamed pretty much every shell handler and WMP11.AssocFile.AVI reference from the registry, and it still gives me the Add to Windows Media Player list and Play with Windows Media Player options on rightclick on AVI.
You've missed some keys then, either use my tool 'File Type Registry Viewer' found on my homepage or read the MSDN documentation, you can find it googling for 'Verbs and File Associations'.
btw, both those Open++ downloads are offline. I cannot find mirrors on google. I was curious as to how big it is (filesize). If I really cannot figure this out, maybe it's an alternative to Open With... because like you say, configuration is more portable.
I've downloaded it after reading your initial post without problems. I've also mailed the author requesting top level menu support and asking where it saves the settings but he didn't reply. I want to port my application to C++ to fix the versioning and resource consumption issues of .NET.
Redsandro
25th June 2009, 17:55
Hey you're right now they work again. Thanks.
Keep us posted on the .NET-less port of your app. :)
stax76
17th July 2009, 15:58
I released a new version of 'File Type Registry Viewer' on my new site, you might find it useful.
http://www.stax76.bplaced.net/index.php?slab=filetyperegistryviewer
I've plans for two shell extensions, the one already mentioned and one to rate any kind of video, currently only wmv files can be rated, avi don't work at all and mp4 don't work right as the entire file is recreated causing heavy IO load. I plan to implement it using either NTFS ADS streams or a database or a mixture of both with intelligent caching. The problem is it's very hard unless you have super C++/Win32/COM skills, .NET is the only thing I'm really good and that is unfortunatelly not an option for shell extensions. It's hard to develop the required skills but I'm working on it. The sad thing is most video container formats and video applications don't have real support for ratings like pictures and MP3's have since a long time. I've more than 500 video files and need to keep track when I've watched something the last time and how I rated it. Since the windows explorer was improved regarding ratings I hope containers and applications improve as well.
Redsandro
17th July 2009, 18:18
Hii, thanks for the update.
I'd also like to make certain tools or plugins sometimes, but I don't know any c++/.NET. I'd really like some turbo lessons on how to do it, because I just don't have the time for lengthy education on this. But every lesson or tutorial I found is either soooo basic that you are dead before you learn anything useful, or it assumes you already know so much that I really don't get what's going on.
It's not exactly like "yeah everyone wants to do stuff without learning how to do it". I've programmed C and Turbo Pascal back in the days. I programmed Java MIDlets for mobile phones. Nowdays I do everything including personal little scripts in PHP, because it's just so easy. But when I boot some 'easy and recommended' IDE to start for example a Winamp plugin, it starts with like a dozen mingled files and I don't get what's up. Just gimme a cursor like in PHP or heck even a number as in MSX-Basic.
I know the modern way makes a lot of sense, I simply find IDE's unable to teach me how to make my life easy.
Ontopic, I would have SWORN that I replied here earlier, explaining I found a way to get the old WinXP shell extensions to work again, so now I am hesitative to post again because you never know when you do something wrong here..
In short:
The \shell\command keys still work when you place them in the HKCR\SystemFileAssociations\.
So you can write an .inf file to install all shell commands you choose at once: [Version]
Signature=$CHICAGO$
[DefaultInstall]
AddReg = VDub32,GSpot,DGIndex,MPC
[VDub32]
HKCR,"SystemFileAssociations\.avi\Shell\VDub32",,,"&VirtualDub32"
HKCR,"SystemFileAssociations\.avi\Shell\VDub32\Command",,,"D:\Software\Video\VirtualDub\VirtualDub.exe" "%1"
HKCR,"SystemFileAssociations\.avs\Shell\VDub32",,,"&VirtualDub32"
HKCR,"SystemFileAssociations\.avs\Shell\VDub32\Command",,,"D:\Software\Video\VirtualDub\VirtualDub.exe" "%1"
[GSpot]
HKCR,"SystemFileAssociations\.avi\Shell\GSpot",,,"&GSpot"
HKCR,"SystemFileAssociations\.avi\Shell\GSpot\Command",,,"D:\Software\Video\Tools\GSpot\GSpot.exe" "%1"
HKCR,"SystemFileAssociations\.mpg\Shell\GSpot",,,"&GSpot"
HKCR,"SystemFileAssociations\.mpg\Shell\GSpot\Command",,,"D:\Software\Video\Tools\GSpot\GSpot.exe" "%1"
[DGIndex]
HKCR,"SystemFileAssociations\.mpg\Shell\DGIndex",,,"DG&Index"
HKCR,"SystemFileAssociations\.mpg\Shell\DGIndex\Command",,,"D:\Software\Video\Tools\DGIndex\DGIndex.exe" "%1"
HKCR,"SystemFileAssociations\.mpeg\Shell\DGIndex",,,"DG&Index"
HKCR,"SystemFileAssociations\.mpeg\Shell\DGIndex\Command",,,"D:\Software\Video\Tools\DGIndex\DGIndex.exe" "%1"
HKCR,"SystemFileAssociations\.m2t\Shell\DGIndex",,,"DG&Index"
HKCR,"SystemFileAssociations\.m2t\Shell\DGIndex\Command",,,"D:\Software\Video\Tools\DGIndex\DGIndex.exe" "%1"
HKCR,"SystemFileAssociations\.vob\Shell\DGIndex",,,"DG&Index"
HKCR,"SystemFileAssociations\.vob\Shell\DGIndex\Command",,,"D:\Software\Video\Tools\DGIndex\DGIndex.exe" "%1"
[MPC]
HKCR,"SystemFileAssociations\.avs\Shell\MPC",,,"Media Player &Classic"
HKCR,"SystemFileAssociations\.avs\Shell\MPC\Command",,,"D:\Software\Video\MPC\mplayerc.exe" "%1"
stax76
17th July 2009, 18:44
I can't help you with INI since I don't know anything about it. Regarding programming, since you are on windows and know C syntax C# would be a good choice, I prefer VB.NET but they are roughly equal and you can automatically translate the code from one to another with little to no errors. Best translation tools are SharpDevelop and Reflector. Free IDE's are Visual Studio Express and SharpDevelop. A new application, language, platform or whatever is always hard, some are harder than others, VB.NET is a walk in the park compared to C++. Other tools you could check is powershell and AutoIt, they are quite popular, personally I don't use anything other than VB.NET and C++, .NET can generally be used to write small scripts so I don't have to learn another language for this and can share code for it.
Redsandro
17th July 2009, 18:55
Thanks for the advice.
I think this may be a bridge too far, but I'd like to use free software and do it in Linux because I love how some great apps are portable between Linux and Windows, and I think the Windows versions are faster than similar .NET based apps, although some core functionality won't be possible because it's just not the same (and not portable). For a while I had a GP2X handheld linux-based game console. I bought it to force me to learn to program in Linux. But I ended up using scripting apps specifically made for easily creating games :P Anyway I sold the thing. I ended up using it as a radio in the shower, but my phone can do that.
stax76
17th July 2009, 19:38
Enthusiastic and talented people develop .NET on Linux but for political reasons languages like C++ and Python will stay dominant until new languages like D become more popular. Web developers are generally more concerned about portability, portability is great of course, the windows shell and COM on which the shell API is based on are far from being portable however.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.