Map F11 to open PowerShell in current path

English support forum

Moderators: sheep, Hacker, Stefan2, white

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

Map F11 to open PowerShell in current path

Post by *Adnan » 2019-09-23, 07:30 UTC

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: 2627
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Map F11 to open PowerShell in current path

Post by *Stefan2 » 2019-09-23, 08:06 UTC

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 >> https://ghisler.ch/board/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
 
Inofficial FAQs || WIKI (Deu/Eng) || TC Home (What's new? // FAQ // Download // Order // Addons // Tools // Plugins)
Erst wenn der letzte Baum gefällt oder die letzte Biene verendet ist, werden die Leute verstehen warum Umweltschutz wichtig ist.

Adnan
Junior Member
Junior Member
Posts: 2
Joined: 2019-09-23, 07:28 UTC

Re: Map F11 to open PowerShell in current path

Post by *Adnan » 2019-09-23, 09:38 UTC

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

Post Reply