Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using GitHub for Windows and would like to use AutoHotKey to map Alt+G to the Git Shell shortcut that is installed on the desktop.

With this in my .ahk file it gives me the error "Failed attempt to launch program or document"

!g::Run C:\Users\dennis\AppData\Local\GitHub\GitHub.appref-ms --open-shell

.appref-ms has something to do with ClickOnce, but I don't know why AutoHotKey can't open it. Is it just not compatible with the Run command, or is there something else I need to do to make this work?

Edit: The same line minus the --open-shell parameter works, but I don't need the GUI. Maybe my issue has more to do with how to pass command line arguments within AutoHotKey.

share|improve this question
Try this: !g::Run, C:\Users\dennis\AppData\Local\GitHub\GitHub.appref-ms --open-shell, C:\Users\dennis\AppData\Local\GitHub\ return – imtheman Sep 12 '12 at 23:15
@PeterMaxwell that didn't work. – CoderDennis Sep 13 '12 at 14:10
up vote 0 down vote accepted

Running the desktop shortcut did the trick!

!g::Run "C:\Users\dennis\Desktop\Git Shell"
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .