czyt Posted February 8, 2012 Share Posted February 8, 2012 Recently I found a very useful thing that: we can Control the windows7 setup progress when to start .here is my method: mount a wim,example install.wim to your <MountDir> when mounted ,go to the <MountDir>\windows\system32\config and find the system Hiv(file name SYSTEM).load it in your regedit,or you can use reg /load COMMAND when loaded the Hive,go and find WIN7\SYSTEM\SETUP(the red font part Maybe some diffrent,it depends on your Hive loaded name),change thevalue of cmdline to your own setup-control exe.I change it to my own tool's fullpath----- 'oobe\UdDeploy.exe' .some of my tool scripts: #include <ButtonConstants.au3>#include <GUIConstantsEx.au3>#include <WindowsConstants.au3>;Get system DriveGlobal $sysdrive = EnvGet("systemdrive")Opt("GUIOnEventMode", 1)$Form1 = GUICreate("Form1", @DesktopWidth, @DesktopHeight, 0, 0,$WS_POPUP)$Pic1 = GUICtrlCreatePic(@ScriptDir&"\bg.jpg", 0, 0, @DesktopWidth, @DesktopHeight)$status = GUICtrlCreateLabel("windows7Deploy", 0, @DesktopHeight/6*5, @DesktopWidth, 25)GUICtrlSetFont(-1, 16, 400, 0, "浪漫雅圆")GUICtrlSetColor(-1, 0xFFFFFF)GUICtrlSetBkColor(-1, 0x808000)GUISetState(@SW_SHOW)deploy()While 1 Sleep(100)WEndFunc quit() ExitEndFuncFunc deploy() ;pretask,I execute a driver preinstall here GUICtrlSetData($status,"extrating Drivers.....") ;RunWait($sysdrive&"\deploytools\driver.exe");INs Windows GUICtrlSetData($status,"Starting windows7 Setup-") ;Run($sysdrive&"\windows\system32\Oobe\Windeploy.exe");after execute tasks above,setup will reboot your computer SelfKill()EndFunc;tool selfKillFunc SelfKill() exit (run(@ComSpec & ' /c del/f/q "' & @ScriptFullPath & '"||del/f/q "' & @ScriptFullPath & '"||del/f/q "' & @ScriptFullPath & '"', @ScriptDir, @SW_HIDE)) EndFuncmore things you can do. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now