Posted on July 24, 2019 at 10:21 pm
With VboxManage you can execute programs inside the guest VM from the host:
VBoxManage guestcontrol Win7-64bit-VM1 start --exe C:\Path\To\Program.exe --verbose --username admin --password 123
If you need to run a program with parameters do like this:
VBoxManage guestcontrol Win7-64bit-VM1 start --exe Z:\cmd.exe --verbose --username admin --password 123 -- Z:\cmd.exe /c "ipconfig /all > Z:\a.txt"
If you need to get the stdout, stderr, and stdin output use “run” instead of “start”:
VBoxManage guestcontrol Win7-64bit-VM1 run --exe Z:\cmd.exe --verbose --username admin --password 123 -- Z:\cmd.exe /c "ipconfig /all > Z:\a.txt"
If you get VERR_PROC_ELEVATION_REQUIRED error:
Starting guest process ... VBoxManage: error: VERR_PROC_ELEVATION_REQUIRED VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component GuestProcessWrap, interface IGuestProcess, callee nsISupports
Make sure to disable UAC and that the user has enough power/permissions.
In case you get the following error message:
VBoxManage: error: The specified user was not able to logon on guest
I found two solutions that worked for me:
Solution 1: Use an Alphanumeric Password
There is an issue if you set a user’s password with special characters, like @#!
So make sure to use an alphanumeric password (i.e Ahj18iAhZad).
Then try again to run the program, it should work.
Solution 2: Disable a Windows Security Policy
If the previous solution didn’t work, try this:
In “Run” type “gpedit.msc”, then go to “Windows Settings” -> “Security Settings” -> “Local Policies” -> “Security Options” -> “Accounts: Limit local account use of blank passwords to console logon only” and set it to DISABLED. A reboot may be needed for the changes to take effect.
If you are running Windows 7 Home and you don’t have Group Policy Editor installed, you can open regedit.exe (Windows Registry) and browse to the following registry key (you’ll need Administrator rights to change it):
Then change the DWORD value “LimitBlankPasswordUse” to 0 (that means disabled).
Reboot the guest VM and try to run the program from the host.
Updated on August 17, 2019 at 10:35 am
- How to Clone a Virtual Machine on VirtualBox via Command-Line
- How to Mount a Shared Folder on VirtualBox Windows Guest
- How to Install VirtualBox Guest Additions on Windows Guest
- Add Shared Folder on VirtualBox VM via Command-Line on Debian
- How to Install a .Deb File on Debian Linux via Command-Line
- Install VirtualBox 6.0 on Debian 10 Buster
- Install Windows 7 Guest on VirtualBox Debian Host (Command-Line)
- Create or Restore a VirtualBox Snapshot on Debian (Command-Line)
- Run a Program Inside a VirtualBox Guest VM from Host via Command-line
- Disable User Account Control (UAC) in Windows 10
- Get the Output of a Program in a Variable in Bash
- Automatically Renew Let's Encrypt Certificates (Nginx)
- Capture Multiple Line Output Into a Bash Variable
- How to Extract Domain from URL in Bash
- Get Local File Permissions from Command-Line on Linux
- Disable Driver Signature Enforcement on Windows 7 64-bit