Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×

Take Control Of your windows7 Setup Progress


 Share

Recommended Posts

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 the

value 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 Drive
Global $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)
WEnd
Func quit()
Exit
EndFunc
Func 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 selfKill
Func SelfKill()
exit (run(@ComSpec & ' /c del/f/q "' & @ScriptFullPath & '"||del/f/q "' & @ScriptFullPath & '"||del/f/q "' & @ScriptFullPath & '"', @ScriptDir, @SW_HIDE))
EndFunc




more things you can do.

Link to comment
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
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...