June 5th, 2012, 02:21 PM
[RESOLVED] activating shortcuts with a custom protocol handler
I'm working on a project to run putty when a website button is pressed. One of the requirements is that putty starts maximized. I'm doing this with a custom protocol handler that activates a shortcut that runs putty. The shortcut is necessary to enable maximization. How do I configure the registry entry for the protocol handler to activate a shortcut. Here is the registry key to point directly at putty (works):
@="\"C:\\Program Files\\Path\\PuTTY\\putty.exe\" \"\"-load session-1\"\""
I can create a shortcut pointing to putty and supplying it with the necessary arguments, which works beautifully either by double-clicking or running from CMD. However, if I point the registry entry at the shortcut:
I get an error message:
"Unable to open this helper application for protocol1:somedummytext..."
I can also attack this by running the following command in cmd:
start /MAX "" "C:\Program Files\Path\PuTTY\PuTTY.exe" -load session-1
However, I cannot figure out how to modify it for use in the protocol handler registry entry. Registry entries can be sensitive to quotes, so I may need to use some fancy quoting to make this work.
June 8th, 2012, 08:56 AM
Re: activating shortcuts with a custom protocol handler
Apparently, a protocol handler can point to a batch file, so I ended up using the latter method. A bit inelegant, though. I would expect consistent (or at least documented) behavior across the methods to call a program with arguments.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!