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.

  • 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

Running the desktop shortcut did the trick!

!g::Run "C:\Users\dennis\Desktop\Git Shell"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.