Opened 10 years ago
Closed 10 years ago
#14717 closed defect (fixed)
guestcontrol run / start don't setup user environment in windows guests
Reported by: | rahoe | Owned by: | |
---|---|---|---|
Component: | guest control | Version: | VirtualBox 5.0.6 |
Keywords: | guestcontrol run start execute | Cc: | |
Guest type: | Windows | Host type: | Linux |
Description
guestcontrol run / guestcontrol start don't setup the right user environment in the Windows guest when starting an application.
Starting an application with VirtualBox 4 "guestcontrol execute" leads to a windows environment like that:
APPDATA=C:\Users\rahoe\AppData\Roaming LOCALAPPDATA=C:\Users\rahoe\AppData\Local TEMP=C:\Users\rahoe\AppData\Local\Temp TMP=C:\Users\rahoe\AppData\Local\Temp USERPROFILE=C:\Users\rahoe ...
Starting in VB 5 per "guestcontrol run":
APPDATA=C:\Windows\system32\config\systemprofile\AppData\Roaming LOCALAPPDATA=C:\Windows\system32\config\systemprofile\AppData\Local TEMP=C:\Windows\TEMP TMP=C:\Windows\TEMP USERPROFILE=C:\Windows\system32\config\systemprofile
So many applications can't work properly because they have no write permissions to profile data or temp directory.
Hints for reproducing the problem:
- Create a windows command script "c:\testit.cmd":
start c:\windows\system32\cmd.exe
- Run it using the following command in VirtualBox 5.0.6:
VBoxManage guestcontrol {vm-name} start --username rahoe --passwordfile password.dat -- 'c:\testit.cmd'
- or
VBoxManage guestcontrol {vm-name} start --username rahoe --passwordfile password.dat --exe 'c:\testit.cmd'
- using "run" instead of "start" don't make any difference
- Execute "set|sort" in the opened windows command shell window.
- Compare with VirtualBox 4.3.30:
VBoxManage guestcontrol {vm-name} execute --username rahoe --passwordfile password.dat --image 'c:\testit.cmd'
Tested with following environments:
- Host: Ubuntu Linux 14.04 x86_64
- Guest: Windows 7
- Guest: Windows 8.1
See also ticket #14506
Note: as a workaround I set the five environment variables listed above using the "--putenv"-Option of VBoxManage; then all tested applications works as with VirtualBox 4.3, e. g. MS Office 2010, VMWare VSphere 5.5, CorelDraw 11
Change History (3)
follow-up: 2 comment:1 by , 10 years ago
comment:2 by , 10 years ago
Replying to pentagonik:
Which Guest Additions are installed on the guest?
5.0.4
After actualizing to currently available 5.0.6 the problem is gone.
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Which Guest Additions are installed on the guest?