I have a weird situation here.
SUMMARY:
- Created a Powershell script
- Created a file shortcut to run it (target is powershell.exe with path to my script passed as a parameter)
- Bound a keyboard shortcut to that file shortcut (using the properties dialog of the file shortcut)
- Later renamed the underlying Powershell script
- After that, pressing the keyboard shortcut causes Windows to try to run the non-existent script (Windows tries to execute the old script filename)
- Can't rebind the keyboard shortcut to a new file shortcut -- pressing the sequence just causes Windows to try to run the original file again, it doesn't rebind to the new file shortcut
So now I have a globally-available keyboard shortcut that tries to execute a non-existent script, and the keyboard shortcut cannot be bound to a new command and cannot be unbound. It is apparently orphaned.
Things I have tried:
Renamed the .ps1 file back to its original name and updated the file shortcut target to point back to it. Press
CTRL+ALT+S
and the script is executed properly. So clearly Windows is somewhere pointingCTRL+ALT+S
to the original .ps1 filename.Deleted the file shortcut and recreated it. The keyboard shortcut field in the properties dialog says
None
so I tried to set it by clicking in the field and pressingCTRL+ALT+S
but that just causes Windows to try to run the original file shortcut again, which fails. It refuses to set the keyboard shortcut in the new file shortcut to that sequence.
Also tried various combinations of things like the above but nothing worked, all with similar results.
So now I have a shortcut key that is bound to nothing and I can't find a way to unbind it.
Where is this binding located?
Properties
and look under theShortcut
tab there is a text field labeledShortcut key
. Once that field has focus you can enter a key chord and it will bind that shortcut. Regardless I just found the solution after digging a bit more, will post an answer momentarily.None