Map F11 to open PowerShell in current path

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Adnan
Junior Member
Junior Member
Posts: 14
Joined: 2019-09-23, 07:28 UTC

Map F11 to open PowerShell in current path

Post by *Adnan »

Hello,

as the title says, I would like to know how to map PowerShell to a key in TC. I managed to map F12 to open CMD but can't find an option for PS.
Thank you
User avatar
Stefan2
Power Member
Power Member
Posts: 4155
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Map F11 to open PowerShell in current path

Post by *Stefan2 »

Hi Adnan and welcome.

Adnan wrote: 2019-09-23, 07:30 UTC ...
I would like to know how to map PowerShell to a key in TC.
I managed to map F12 to open CMD ((( build-in command cm_ExecuteDOS )))
but can't find an option for PS.



Search the forum for "user defined command" or "usercmd.ini"
(FAQs: User-Defined Command (UDC) (usercmd.ini) em_command >> viewtopic.php?p=344777#p344777)
The basics:
Just edit the file "usercmd.ini" in your TC directory.
Note 1: Usercmd.ini is always in the same directory as wincmd.ini (see Help menu > About TC > Paths)
Note 2: If you have no usercmd.ini there, create the file first as plain text file (ASCII or UNICODE)


So create an UDC in the "usercmd.ini"

[em_LaunchPowerShell]
cmd=PowerShell.exe


or as you like, f.ex:

[em_PowerShell_NoExit]
cmd=PowerShell.exe -NoProfile - NoExit




and next use an such created "em_LaunchPowerShell" as command for your keyboard mapping.
Menu Configuration > Options... > Misc. >>> Redefine hotkeys (Keyboard remapping)
(or just modify the wincmd.ini, search for [Shortcuts] and add a line "F11=cm_LaunchPowerShell")



HTH? :D
 
Adnan
Junior Member
Junior Member
Posts: 14
Joined: 2019-09-23, 07:28 UTC

Re: Map F11 to open PowerShell in current path

Post by *Adnan »

It worked! Thanks a lot.
Have a nice day! :)
Post Reply