With the help manual and some posts from this forum I wrote the following bat file. I would be greateful if someone spots errors or gives suggestions to improve it.
The folder that I would like to share temporarily (i.e. when needed) is from a USB drive (with path "D:\my_external_path").
Code: Select all
echo on
c:
cd "c:\Program files\VirtualBox\"
VBoxManage sharedfolder add "myVM_name" --name "mySharedFolders_name" --hostpath "D:\my_external_path" --transient --automount
pause
echo off
exita) Can the bat file be run before launching the guest VM and it is safer to do so? In my testing in fact I see that the script asks theGuest VM needs to be open.
b) Is there a way to run a similar bat file within the Guest VM (it would be better: each Guest VM has its own bat file), instead from the host OS?
Thanks