Overriding right click actions
-
Please help a novice... You know how in Windows Explorer you can right click a file, select Properties, and the dialog appears? I need files of a particular extension to execute MY DLL in lieu of the Windows File Properties actions. Does anyone know how to do this? I'd appreciate any help. Thanks.:confused:
-
Please help a novice... You know how in Windows Explorer you can right click a file, select Properties, and the dialog appears? I need files of a particular extension to execute MY DLL in lieu of the Windows File Properties actions. Does anyone know how to do this? I'd appreciate any help. Thanks.:confused:
The Properties menu item is part of the OS (it connects to some OS functions that tell you stuff like the date the file was created, last modified, MSDOS name, etc). You can edit the registry to add addition items to the menu (ie "Settings" in addition to the "Properties" menu item). To do this, you can edit the registry by hand or copy the following script (replacing with your apps names and extensions ; Script starts here REGEDIT HKEY_CLASSES_ROOT\.ext = My.Document HKEY_CLASSES_ROOT\My.Document = My Document HKEY_CLASSES_ROOT\My.Document\shell\mycommand = &My Command HKEY_CLASSES_ROOT\My.Document\shell\mycommand\command = "C:\thing\to\execute" "arguments" ; End script Replace . . . .ext with your extension My.Document with your Document type (must match with the Document type your application wants) My Document with you Document name (can be anything you want to appear in Windows Properties mycommand with the name of the command you want (ie Settings) &My Command with the string you want to appear in the drop down menu (the & will underline the following character so if you right click and press M, for this example, it would run My Command) "C:\thing\to\execute" with the path to your program or dll (you may need a surrogate for a dll) "arguments" with any arguments your application needs (ie filename) Hope this helps Zac
-
The Properties menu item is part of the OS (it connects to some OS functions that tell you stuff like the date the file was created, last modified, MSDOS name, etc). You can edit the registry to add addition items to the menu (ie "Settings" in addition to the "Properties" menu item). To do this, you can edit the registry by hand or copy the following script (replacing with your apps names and extensions ; Script starts here REGEDIT HKEY_CLASSES_ROOT\.ext = My.Document HKEY_CLASSES_ROOT\My.Document = My Document HKEY_CLASSES_ROOT\My.Document\shell\mycommand = &My Command HKEY_CLASSES_ROOT\My.Document\shell\mycommand\command = "C:\thing\to\execute" "arguments" ; End script Replace . . . .ext with your extension My.Document with your Document type (must match with the Document type your application wants) My Document with you Document name (can be anything you want to appear in Windows Properties mycommand with the name of the command you want (ie Settings) &My Command with the string you want to appear in the drop down menu (the & will underline the following character so if you right click and press M, for this example, it would run My Command) "C:\thing\to\execute" with the path to your program or dll (you may need a surrogate for a dll) "arguments" with any arguments your application needs (ie filename) Hope this helps Zac
Thanks for your help :-D This requirement is always changing...