I have created a pdf viewer exe that shows the pdf in an activex gui control. This script replaced adobe viewer as the default program. Everything is great, except the button to print directly from explorer is missing. I think it is possible to attach this custom command to my exe, but it looks like it could be daunting. From here https://www.sevenforums.com/customization/96851-add-custom-explorer-bar-buttons-actions.html they talk about some registry keys that are associated with this functionality. I also found this https://www.nirsoft.net/utils/custom_explorer_toolbar.html but is seems like overkill.
Has anyone been able to tie a custom command set to their program type for use in explorer?
Custom button in explorer
Re: Custom button in explorer
If you were planning to use the Explorer context menu, you could look up how to alter the target program for the print verb. An alternative is simply to set a hotkey that will use a PDF program's command line to print the selected file or files. You would not even need a button for that, though you could create a custom GUI for it if needed.
Re: Custom button in explorer
Thanks for the suggestions, verb is the term I needed to look up. I can't change the interface because my coworker using this script doesn't adjust to change very well.
I managed to enable the verb button by adding this registry key.
This opens the pdf in pdfViewer.exe. Now I just need to mimic the printing command that adobe uses.
Unfortunately, the adobe command does not exist in
They must be doing it a different way.
I managed to enable the verb button by adding this registry key.
Code: Select all
Computer\HKEY_CLASSES_ROOT\Applications\PDFViewer.exe\shell\print\command
with default string =
"my path to my exe\pdfViewer.exe" "%1"
Unfortunately, the adobe command does not exist in
Code: Select all
Computer\HKEY_CLASSES_ROOT\Applications\AcroRD32.exe\shell\print
Re: Custom button in explorer
That would not be a surprise! I have not tried it, but there seem to be some PDF gurus on the forum who may be able to respond. I use the cheater's method myself, which is to use the free SumatraPDF and its command line.