Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: Aliases version 1.0.0
- :: By Mor Merhav
- :: This install script does the following steps:
- :: 1) Creates following file in %USERPROFILE%\\dev\\:
- :: - aliases.cmd
- :: 2) Adds 'Autorun' value to registry: %USERPROFILE%\\dev\\aliases.cmd
- ::
- :: The result is that everything in aliases.cmd is run automatically each time a CMD terminal session is opened.
- :: You can now add to aliases.cmd whatever aliases/quick commands (using doskey) you wish!
- mkdir %USERPROFILE%\\dev\\
- @echo Creating 'aliases.cmd' file...
- @echo off
- @echo @echo off > %USERPROFILE%\\dev\\aliases.cmd
- @echo echo Running with Aliases version "1.0.0" >> %USERPROFILE%\\dev\\aliases.cmd
- @echo doskey mci=mvn clean install -DskipTests >> %USERPROFILE%\\dev\\aliases.cmd
- @echo doskey mvn_versions=mvn versions:set -DnewVersion=$1 $T mvn versions:commit >> %USERPROFILE%\\dev\\aliases.cmd
- @echo doskey aliases=doskey /macros >> %USERPROFILE%\\dev\\aliases.cmd
- @echo on
- @echo Creating registery value 'Autorun' ...
- @echo off
- start /wait reg add "HKCU\Software\Microsoft\Command Processor" /v Autorun /t REG_SZ /d %USERPROFILE%\\dev\\aliases.cmd
- if errorlevel 1 (
- @echo on
- echo Registry key creation failed with error: [%errorlevel%] from reg.exe
- pause
- exit /b %errorlevel%
- )
- @echo on
- @echo Aliases installation finished successfuly!
- pause
Add Comment
Please, Sign In to add comment