Reputation: 813
I have a Virtualbox instance running Windows10, and am running the following command from outside of VirtualBox:
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
--nologo guestcontrol "Win10_x64" run
--exe "\\VBOXSVR\codemodel\VirtualBox_RunInstaller.bat"
--username user --password pass
--wait-stdout
-- VERSION5
The argument I am trying to pass to the VirtualBox_RunInstaller
bat file is VERSION5
, but %1
is always empty. I can see this because when set version=%1
is run, it prints out set version=
. So it is successfully running the batch file, but no arguments are getting passed to it.
Have I got the syntax wrong? I've tried several variations at this point but haven't got it right yet.
Upvotes: 0
Views: 622
Reputation:
If I understand this link correctly the --exe to address is cmd.exe and the batch file has to be the first argument (to the exe)
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" ^
--nologo guestcontrol "Win10_x64" run ^
--exe cmd.exe ^
--username user --password pass ^
--wait-stdout ^
-- "\\VBOXSVR\codemodel\VirtualBox_RunInstaller.bat" VERSION5
Upvotes: 1