0
0
0pt1muS2020-04-06 18:25:31
PowerShell
0pt1muS, 2020-04-06 18:25:31

Bind commands in Windows?

How to register a permanent alias (bind/attach/write a word/phrase/command) for the system so that when you enter a command like "pws" into run.exe or cmd.exe or powershell.exe, for example, Powershell opens?

So far, it is implemented only in an open powershell session using Set-Alias ​​pwd c:\...\

powershell.exe And by the way, where are all the other alias from Get-Alias ​​?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
0
0pt1muS, 2020-04-26
@0pt1muS

Everything turned out to be easy. The difference is only in the number of such commands, depending on the version of Windows.
We go to the "System" in the Taskbar, then in the add. parameters, then edit the PATH variable, changing one existing entry, or adding many new ones in the format "program name" and "path to the folder with the program".

A
azarij, 2020-04-06
@azarij

in powershell, you can add your own aliases to your own profile. the profile is executed at each start of the turn.
in cmd, it is advised to put doskey aliases in the .cmd file and change the default cmd launch line in the registry so that it starts this .cmd file with aliases first.
https://www.google.com/search?q=set+up+aliases+in+cmd

X
xmoonlight, 2020-04-06
@xmoonlight

I put batch files in% system% and there are no problems!))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question