Skip to content

Instantly share code, notes, and snippets.

@sola-msr
Last active March 26, 2019 09:16
Show Gist options
  • Save sola-msr/8ae76ae2efc6b9c8ede347b8449e1011 to your computer and use it in GitHub Desktop.
Save sola-msr/8ae76ae2efc6b9c8ede347b8449e1011 to your computer and use it in GitHub Desktop.
【Vagrant】Windows上でVagrantをワンクリックで起動させるバッチ「Vagrant Launcher」 ref: https://qiita.com/sola-msr/items/efdf2268cba838ea0dfe
@echo off
REM --------------
REM config file
REM --------------
cd /d %~dp0
REM Directory with virtualization software (VirtualBox.exe)
REM (* It may be possible to use VMware, but I have not tried it.)
SET VIRTUALIZATIONSOFTWARE_DIR=
REM Project directory
SET PROJECT_DIR=
SET VIRTUALIZATIONSOFTWARE_DIR=C:\Program Files\Oracle\VirtualBox
@echo off
REM Vagrant Launcher
CALL config.bat
echo **** Vagrant Launcher ****
echo Vagrant Launcher is executeing...
cd /d %~dp0
cd %VIRTUALIZATIONSOFTWARE_DIR%
REM * By default it is written assuming to use VirtualBox.
start VirtualBox.exe
cd %PROJECT_DIR%
echo vagrant up command execute.
vagrant up
cmd /k cd %PROJECT_DIR%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment