Gary Kuznitz
2014-05-31 00:34:03 UTC
I found this bat file on the internet.
It does start the guest OS but it doesn't start minimized.
Does anyone have any idea what I need to do to get the guest OS to start
minimized?
Thank you,
Gary
@echo off
:: This will start a VirtualBox guest minimized
::
:: To get the ID run:
:: vboxmanage list vms
::
if not "%minimized%"=="" goto :minimized
set minimized=true
start /min cmd /C "%~dpnx0"
goto :EOF
:minimized
rem Anything after here will run in a minimized window
rem bring the current directoty forward and change drives cause windows normally
starts your process from system32
rem bringing the process forward to the script location means it will launch
myscript
from its location
%~d0
CD %~dp0
cls
rem Open the folder in a new process and close/exit this one
start /wait /b C:\Programs\VirtualBox\VirtualBox.exe --startvm
"c2f7cf76-be3e-496f-8e77-f2823e65c5bd" /SEPARATE/N
exit
It does start the guest OS but it doesn't start minimized.
Does anyone have any idea what I need to do to get the guest OS to start
minimized?
Thank you,
Gary
@echo off
:: This will start a VirtualBox guest minimized
::
:: To get the ID run:
:: vboxmanage list vms
::
if not "%minimized%"=="" goto :minimized
set minimized=true
start /min cmd /C "%~dpnx0"
goto :EOF
:minimized
rem Anything after here will run in a minimized window
rem bring the current directoty forward and change drives cause windows normally
starts your process from system32
rem bringing the process forward to the script location means it will launch
myscript
from its location
%~d0
CD %~dp0
cls
rem Open the folder in a new process and close/exit this one
start /wait /b C:\Programs\VirtualBox\VirtualBox.exe --startvm
"c2f7cf76-be3e-496f-8e77-f2823e65c5bd" /SEPARATE/N
exit