Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtualbox Main Process starts as admin #43

Open
TSlivede opened this issue Sep 30, 2016 · 0 comments
Open

Virtualbox Main Process starts as admin #43

TSlivede opened this issue Sep 30, 2016 · 0 comments

Comments

@TSlivede
Copy link

Hi everyone and thanks for Portable-VirtualBox!

I know, vbox-portable needs admin rights for installing drivers and services,
but I think it would be better if Virtualbox Main Process stated as non-admin.

VirtualBox.exe running as admin causes some Problems:

  • You can't drag and drop into vm-windows (windows doesn't allow drag'n'drop from nonadmin to admin window)
  • Mounted network drives can't be mapped as vbox-shared-folders (windows maps drive-letters of network drives only to nonadmin session)
  • Within vbox-shared-folders you have full administrative access to all files, and can easily damage your system (if one shares complete 'c:' drive)

The problem could be solved, by replacing RunWait calls on lines 738,740,743,753,755 and 758 in 'Portable-VirtualBox.au3' with calls like:
_ShellExecuteWithReducedPrivileges('cmd',"cmd /c set VBOX_USER_HOME="& $UserHome &"& .\"& $arch &"\VirtualBox.exe",@ScriptDir,'',@SW_HIDE,True)

(using '_ShellExecuteWithReducedPrivileges.au3' from https://sites.google.com/site/ascend4ntscode/shellexecutewithreducedprivileges)

Sadly, _ShellExecuteWithReducedPrivileges doesn't wait, therefor I temporarily solved the problem in my local installation by inserting a Sleep call before ProcessWaitClose ("VirtualBox.exe").

As this solution isn't very clean and I don't want to patch vbox-portable everytime I download it, I do now post this as an Issue.

PS: sorry for my bad english :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant