Hey gang,
I'm working on packaging up VirtualBox and have most of it done. At the end of the installation, I need to either register the VM with the VirtualBox Manager or open the .vbox file to start the VM which will auto-register. The VM files will live in the logged in user's Library folder and registering the VM populates the VirtualBox Manager app's list of VMs that opens when VirtualBox is launched.
There is a command line tool with VirtualBox for registering the VM:
VBoxManage registervm "/path/to/VirtualBox/Windows/Windows.vbox"
As I mentioned above, these files will live in the logged in user's Library folder (VBox seems to really prefer this location to function properly). When this script runs at the end of my policy, it's looking to our management account's home folder for the files and throws an error in the log. I'm not a good script writer yet so I'm hoping you guys can share with me a way to have it point to the actual logged in user's home folder instead of the Casper management account's home folder. I tried using the $userName variable from Casper and that didn't seem to work but maybe I didn't do it right.
Thanks and appreciate any guidance.
Tom
-------
Tom Anderson
Apple Network Engineer - Institutional Computing
Shenandoah University
1460 University Drive
Winchester, VA 22601