supster Posted May 25, 2005 Posted May 25, 2005 Hello, I have been working on something and have run into a problem when trying to do something to all extensions.In the registry, under HKEY_CLASSES\SystemFileAssociations\, there is a list of extensions (such as .txt, .mp3, etc), and each extension has some sub-keys and values associated to it to represent things such as context menu handling and default icons.There are also groups of extensions. You will find SystemFileAssociations\image and \audio. These seem to be applied to files of those types.However, my problem occurs when I want to apply something to all file types. For simplicity's sake let's say I want to add the DefaultIcon key for all extensions.I have tried many different things, such as SystemFileAssociations\*, \*.*, \all, etc, but none of it seems to work.I know that in the HKEY_CLASSES root, there is a HKEY_CLASSES\* subkey which applies to all extensions, however there are some things I wish to do that is only available in the SystemFileAssociations\ subkey.I would also like to apply some things to Directories. There is Directory.Audio, and Directory.Video, but Directory by itself doesn't weem to work.I have searched around and have not been able to find any solutions, if anyone has any ideas I would appreciate the input.If anyone is interested in what I'm working on, it's a utility that adds a menu to the right click context menu to allow uploading of images to a couple hosts such as ImageShack. You can see it here.
bledd Posted May 25, 2005 Posted May 25, 2005 can you search for where the 'add to archive' message is kept for winrar?
Takeshi Posted May 26, 2005 Posted May 26, 2005 A lot of custom menu extensions have their own CLSIDs in the registry (also under HKCR) and many subkeys refer to these CLSIDs. Have you tried doing this?
[deXter] Posted May 26, 2005 Posted May 26, 2005 If anyone is interested in what I'm working on, it's a utility that adds a menu to the right click context menu to allow uploading of images to a couple hosts such as ImageShack. You can see it here.Just browse over to HKEY_CLASSES_ROOT\*\shellAdd a new subkey say, "Upload to ImageShack", under that make another subkey called "command". Set the (Default) value to your executable. For eg, "C:\My Programs\uploader.exe" parameters "%1".And if you want to add something to all folders, then drop down to HKEY_CLASSES_ROOT\Folder\shell. Make a new subkey, say "Upload all files to ImageShack", make a "command" subkey and set the default value in the above format. Only %1 here would be replaced by the folder path.For paticular file formats, the method is exactly the same. Say you want to add this for a .jpeg, then head over to HKEY_CLASSES_ROOT\jpegfile\shell... and you know the rest.
supster Posted May 26, 2005 Author Posted May 26, 2005 ,May 25 2005, 07:26 PM]If anyone is interested in what I'm working on, it's a utility that adds a menu to the right click context menu to allow uploading of images to a couple hosts such as ImageShack. You can see it here.Just browse over to HKEY_CLASSES_ROOT\*\shellAdd a new subkey say, "Upload to ImageShack", under that make another subkey called "command". Set the (Default) value to your executable. For eg, "C:\My Programs\uploader.exe" parameters "%1".<{POST_SNAPBACK}>I wish it was that simple. I build a sub-menu structure, so that is not an option. Even it if it was, it does not answer my specific question of how to do it in SystemFileAssociations\.If you're interested, the way I do it now is add a DLL to the Assembly Cache which contains methods to draw the context menu (a huge PITA), and then is referenced from the registry from HKEY_CLASSES_ROOT\*\. This is how I did the initial version of ShellUploader, but I have been looking to change it for the never version.Thanks anyway.A lot of custom menu extensions have their own CLSIDs in the registry (also under HKCR) and many subkeys refer to these CLSIDs. Have you tried doing this?<{POST_SNAPBACK}>Something along these lines is what ended up being the solution for me.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now