[Casper] boot camp commands on windows

Thomas Larkin TLARKI at kckps.org
Wed Jul 9 15:37:34 PDT 2008


Well,

After a long and hard day of surfing the web and google searching every possibility my Novell/software developer guy I work with actually figured it out.  Now, when a user logs into windows there is an object policy in Novell that if they have the bootcamp.exe installed on their machine it will automatically launch the MAP testing software.  Now, once they exit the machine it runs a script which invokes a freeware program called autoIT.  AutoIT will detect the current open window and can open and execute programs.  So we told it to open up the boot camp manager in windows, select OS X start up disk and you can map mouse coordinates for current open windows.  He basically mapped out where the OK button is located to reboot and then told it to reboot the system.  Then it reboots back into OS X.   I found this all on a thread from Bombich's site.

This would also be great for anyone who was deploying dual booting OS X/Windows boxes and wanted the machine to after it was done imaging reboot windows to run sysprep just once, and then reboot back into OS X permanently.

here is the 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:\Windows\system32\AppleControlPanel.exe")
Run("C:\Windows\system32\AppleControlPanel.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:\Windows\system32\shutdown.exe -f -r -t 0")


here is the app autoIT

http://www.autoitscript.com/autoit3/downloads.shtml 


Here is the bombich link

http://forums.bombich.com/viewtopic.php?p=45711

Of course Steve Rose, the guy I work with is the genius that put it all together.

Thomas Larkin
TIS Department
KCKPS USD500
tlarki at kckps.org
cell:  913-449-7589
office:  913-627-0351

>>> "Thomas Larkin" <TLARKI at kckps.org> 7/9/2008 12:19 PM >>>
Sorry if this is beating a dead horse, but I even have some peopel at Apple helping me on this one.  I am also, on a side note, missing the corporate world now where you don't need to micromanage your users as much.

So, I know that the exe file for boot camp in Windows lives here

C:\Program Files\Boot Camp\KbMgr.exe

I was thinking I could do a simple script like this (and my Windows scripting skills suck)

@echo off
rem run your program and wait until its done
start /wait \\path\to\maptest ......

rem bootcampfix  ....
C:\Program Files\Boot Camp\KbdMgr.exe"....  Restart in Mac OS X....

rem schedule reboot NOW. during testing change 0 to 60
rem reboot can be stopped by shutdown -a from a cmd prompt (start menu/run cmd)
shutdown -r -t 0

However I don't think it works, well I know it doesn't work.  

Thomas Larkin
TIS Department
KCKPS USD500
tlarki at kckps.org 
cell:  913-449-7589
office:  913-627-0351

_______________________________________________
Casper mailing list
Casper at list.jamfsoftware.com 
http://list.jamfsoftware.com/mailman/listinfo/casper



More information about the Casper mailing list