Bat File (CMD) set Shortcut Key

Hotkey to run a batch file to hibernate the computer 





Updated: I tested it moving a shortcut sequentially to different folders and surprisingly it works only in following folders (might not be complete):

  • Desktop: %USERPROFILE%\Desktop
  • Common Desktop: C:\Users\Public\Desktop
  • Common Start Menu: %ProgramData%\Microsoft\Windows\Start Menu
  • Common Programs: %ProgramData%\Microsoft\Windows\Start Menu\Programs
  • Accessories: %appdata%\Microsoft\Windows\Start Menu\Programs\Accessories

Moreover, I had to open Properties of a moved shortcut to

  • refresh the hotkey for the shortcut by setting it to anything else and then back to final hotkey CtrlAlt+H, and
  • change shortcut target (only in some of folders mentioned above)
    • from "D:\bat files\my Test Script.bat"
    • to cmd /c "D:\bat files\my Test Script.bat"

Referrence Link : 





Comments

Popular posts from this blog