Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: This install script does the following steps:
- :: 1) Creates following files in %USERPROFILE%\\dev\\:
- :: - env.cmd
- :: - regenv.reg
- :: 2) Runs regenv.reg
- ::
- :: The result is that everything in env.cmd is run automatically each time a CMD terminal session is opened.
- :: You can now add to env.cmd whatever aliases/quick commands (using doskey) you wish!
- mkdir %USERPROFILE%\\dev\\
- @echo Creating 'env.cmd' file...
- @echo off
- @echo @echo off > %USERPROFILE%\\dev\\env.cmd
- @echo doskey mci=mvn clean install -DskipTests >> %USERPROFILE%\\dev\\env.cmd
- @echo doskey mvn_versions=mvn versions:set -DnewVersion=$1 $T mvn versions:commit >> %USERPROFILE%\\dev\\env.cmd
- @echo on
- @echo Creating 'regenv.reg' file...
- @echo off
- @echo Windows Registry Editor Version 5.00 > %USERPROFILE%\\dev\\regenv.reg
- @echo [HKEY_CURRENT_USER\Software\Microsoft\Command Processor] >> %USERPROFILE%\\dev\\regenv.reg
- @echo "AutoRun"="%%USERPROFILE%%\\dev\\env.cmd" >> %USERPROFILE%\\dev\\regenv.reg
- @echo on
- @echo Running 'regenv.reg' file...
- regedit.exe /s %USERPROFILE%\\dev\\regenv.reg
- @echo Env install finished successfuly !
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement