Jump to content

Windows shell scripting, please help :)

Go to solution Solved by C2dan88,

Something like

@echo off

set "VBoxPath=C:\Program Files\Oracle\VirtualBox\"
set "VBoxManageExe=%VBoxPath%VboxManage.exe"

timeout /t 60 /nobreak
"%VBoxManageExe%" startvm "vmname" --type headless

timeout /t 60 /nobreak
"%VBoxManageExe%" controlvm "vmname" addencpassword "identifier" path\to\password\file

 

I'd like to create a .bat file to run a simple script, then create a shortcut so it can be ran upon booting windows :)

 

Could someone please help me convert this to a shell script?

 

1) Sleep 1 minute

2) Change to "C:\Program Files\Oracle\VirtualBox"

3) Run Vboxmanage startvm "vmname" --type headless

4) Sleep 1 minute

5) Run Vboxmanage controlvm "vmname" addencpassword "identifier" path\to\password\file

 

Please and thank you very much! :D

Link to comment
https://linustechtips.com/topic/1181916-windows-shell-scripting-please-help/
Share on other sites

Link to post
Share on other sites

Something like

@echo off

set "VBoxPath=C:\Program Files\Oracle\VirtualBox\"
set "VBoxManageExe=%VBoxPath%VboxManage.exe"

timeout /t 60 /nobreak
"%VBoxManageExe%" startvm "vmname" --type headless

timeout /t 60 /nobreak
"%VBoxManageExe%" controlvm "vmname" addencpassword "identifier" path\to\password\file

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×