Scripit with password to open VBox

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
casalva
Posts: 12
Joined: 20. Feb 2013, 19:38

Scripit with password to open VBox

Post by casalva »

Hi,
to avoid an error opening VBox I would like to write a script that will execute these commands:
- Open the Terminal,
- run the script "sudo ..." ,
- automatically enter the password + Enter,
- start VBox.
- close the Terminal.
I started like this:
tell application "Terminal",
do script "sudo kextload / Library / Extensions / VBoxDrv.kext /"
...
end tell

I do not know how to continue with the password.
Can you help me? Thanks
Casalva
iMac OS X 10.7.5 Lion - VirtualBox 4.2.10
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Scripit with password to open VBox

Post by noteirak »

I am afraid this is in no way related to Virtualbox. It is a scripting question, which should be on dedicated forum for that.
We only offer support for Virtualbox-related issues, and this is not one of them.

Also, you would find the answer to your question on Google, among the thousands replies that people made for this very popular question.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
casalva
Posts: 12
Joined: 20. Feb 2013, 19:38

Re: Scripit with password to open VBox

Post by casalva »

noteirak wrote:I am afraid this is in no way related to Virtualbox. It is a scripting question, which should be on dedicated forum for that.
We only offer support for Virtualbox-related issues, and this is not one of them.
The script is used to solve a boot error in Virtual Box. See my other post viewtopic.php?f=8&t=54225
Casalva
iMac OS X 10.7.5 Lion - VirtualBox 4.2.10
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Scripit with password to open VBox

Post by noteirak »

That is fine, it is how you want to use your script. but how to make the script work - like passing the value of your password to sudo - is not on this.
Now, I am not saying you must go somewhere else, but if you want a fast answer on how to make that work, Google has solutions for you ready at hand.
There is no guarantee you'll get an answer here for something not directly related to Virtualbox.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
casalva
Posts: 12
Joined: 20. Feb 2013, 19:38

Re: Scripit with password to open VBox

Post by casalva »

Thanks, I am also looking on Google.
Casalva
iMac OS X 10.7.5 Lion - VirtualBox 4.2.10
Post Reply