Custom Windows context menu shell command targetting documents: *.docx and *.pdf

2

Currently I have a custom command for moving a selected file(s) to the correct cloud storage folder. I do this using the following (executed as a .reg file):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\SystemFileAssociations\document\shell\Cloud]
@="Move to Cloud Folder"
"Icon"="%SystemRoot%//system32//shell32.dll,-16752"
"MultiSelectModel"="Player"

[HKEY_CLASSES_ROOT\SystemFileAssociations\document\shell\Cloud\command]
@="\"C:\\Move to Cloud Folder.exe\" \"%1\""

[HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\Cloud]
@="Move to Cloud Folder"
"Icon"="%SystemRoot%//system32//shell32.dll,-16752"
"MultiSelectModel"="Player"

[HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\Cloud\command]
@="\"C:\\Move to Cloud Folder.exe\" \"%1\""

This works fine for image types: e.g. pic.bmp. However, for *.docx or *.pdf, the command is not listed when right-clicking on either file type. I have checked and both file types have their perceived type set as document as they should.

I do not want to use [HKEY_CLASSES_ROOT\*]. How do I target these file types (*.docx and *.pdf)? Any ideas why the method I use for images does not work for documents?

u01jmg3

Posted 2017-04-06T13:22:03.637

Reputation: 254

Answers

0

Using an older application called ContextEdit I was able to target the required file types and produce the following reg file:

Windows Registry Editor Version 5.00

; PDF files (*.pdf) viewed using Chrome browser

[HKEY_CLASSES_ROOT\ChromeHTML\shell\Cloud]
@="Move to Cloud Folder"
"Icon"="%SystemRoot%//system32//shell32.dll,-16752"
"MultiSelectModel"="Player"

[HKEY_CLASSES_ROOT\ChromeHTML\shell\Cloud\command]
@="\"C:\\Move to Cloud Folder.exe\" \"%1\""

; Word files (*.docx)

[HKEY_CLASSES_ROOT\Word.Document.12\shell\Cloud]
@="Move to Cloud Folder"
"Icon"="%SystemRoot%//system32//shell32.dll,-16752"
"MultiSelectModel"="Player"

[HKEY_CLASSES_ROOT\Word.Document.12\shell\Cloud\command]
@="\"C:\\Move to Cloud Folder.exe\" \"%1\""

Any ideas why the method I use for images does not work for documents?

Still do not have an answer for this

u01jmg3

Posted 2017-04-06T13:22:03.637

Reputation: 254