Skip to content

Instantly share code, notes, and snippets.

@Shterneregen
Last active March 26, 2020 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shterneregen/05df13b8b271f19484aa39f553bd5c11 to your computer and use it in GitHub Desktop.
Save Shterneregen/05df13b8b271f19484aa39f553bd5c11 to your computer and use it in GitHub Desktop.
How to create CMD aliases in Windows
# This file should be placed in folder you wrote in AutoRun in alias.reg file (%USERPROFILE%\alias.cmd)
# https://stackoverflow.com/questions/20530996/aliases-in-windows-command-prompt
@echo off
DOSKEY alias=notepad %USERPROFILE%\alias.cmd
DOSKEY go=cd C:\Program Files
DOSKEY some_command_alias=ant clean all
DOSKEY some_alias=some.bat
; Run this file by admin
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"AutoRun"="%USERPROFILE%\\alias.cmd"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment