windows alias

  1. Make file cmd-alias.bat in the user path C:\Users\Dell with content like below. You also can make this file in other path.
    doskey sayhello=echo Hello $*
    doskey cattxt=type xxxxxxxxxxxx.txt $*

  2. Win+R > regedit>HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor make a new key AutoRunwith value C:\Users\Dell\cmd-alias.bat then save and exit.

  3. here you may need to reboot your computer.

Then you can run the command sayhello in cmd.

猜你喜欢

转载自blog.csdn.net/xy707707/article/details/80858445
今日推荐