-
Create a file called
alias.cmd
in the user folder (i.e.%USERPROFILE\alias.cmd
) or where ever you feel suited. This will be like your~/.bash_alias
on your linux machine. -
Add your alias into the script using the
doskey
command
Note: $*
is used to allow taking arguments
- Register it to be applied automatically whenever
cmd.exe
is executed
- Restart cmd for the changes to take effect To unregister:
reg delete "HKCU\Software\Microsoft\Command Processor" /v AutoRun
However this will remove all added scripts.