Skip to content

Instantly share code, notes, and snippets.

@Zaksh
Created January 8, 2018 07:39
Show Gist options
  • Save Zaksh/02847016c2587c9f3dac7aba49c7d6a6 to your computer and use it in GitHub Desktop.
Save Zaksh/02847016c2587c9f3dac7aba49c7d6a6 to your computer and use it in GitHub Desktop.
Alias for Windows command prompt with reg file to bind it to command promt execution.
:: REF: https://stackoverflow.com/a/21040825/838269
@echo off
:: Temporary system path at cmd startup
set PATH=%PATH%;"C:\Program Files (x86)\Notepad++\"
:: Add to path by command
doskey npp=notepad++.exe $*
:: Commands
DOSKEY ls=dir /B
DOSKEY alias=notepad++ %USERPROFILE%\alias.cmd
[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