Posted on 12-20-2011 07:34 AM
This is an older thing I did, back in 2008-2009 so hopefully it still works. It basically allows non admin users to boot into Windows via Self Service. Assuming all your imaging is done and you have a fully functional client running both Windows and OS X, this is how you do this.
1) Create a Self Service policy that runs the bless command to boot your Mac into Windows itself. On the reboot tab have it force a reboot, and on the advance tab have it run this command:
/usr/sbin/bless --device /dev/disk0s3 --setBoot --legacy --nextonly
*note* that /dev/disk0s3 was my Windows partition in our deployment. Yours may vary, so you may need to alter that part of the command.
2) Once windows loads you will need some sort of PC service that can run scripts given a trigger. SMS, SCCP, Absolute, eDirectory, Zen, and so forth. For us, we created an object policy that would be deployed to every Windows client that had the bootcamp.exe present. Since a PC running Windows won't have that particular executable it only applied to all Macs. After you figure out your trigger have it execute this AutoIT script.
;; boot_to_osx.au3
;;
;; there's no way to do this with the command line or anything,
;; so here's a little autoit script to use apple's provided
;; utility to bless the OSX drive.
#requireadmin
Local $dom = envget("USERDOMAIN")
;;runas("maptestadmin",$dom,"m4pt3st",0,"C:Windowssystem32AppleControlPanel.exe")
Run("C:Windowssystem32AppleControlPanel.exe")
WinWait("Boot Camp Control Panel")
WinActivate("Boot Camp Control Panel")
WinWaitActive ("Boot Camp Control Panel")
ControlClick ("Boot Camp Control Panel", "", "[CLASSNN:SysListView321]", "left", 1, 40, 20)
ControlClick("Boot Camp Control Panel", "OK", 1)
Run("C:Windowssystem32shutdown.exe -f -r -t 0")
Your trigger could be anything you want it to be. Ours was when a certain application got terminated, the script auto executed. here is a youtube video of the whole process: