TUTORIAL: Create perfect Windows Post-Setup using OOBE.cmd

So I'll explain it better. I use this writing by Jorge king edited for the execute directly from the pendrive being called by the runoncex. And I also create the conection with Wi-Fi in specialize. But I noticed that in some notebooks with Wi-Fi connected already in OOBE Windows because it already has a connection with Wi-Fi it starts looking for usb drivers and updates. For example and if the script is installing Office or looking for watcher.cmd for example is the usb driver updating it gives a failure, the script loses the connection to the USB stick and thus gives an error of not finding the executable.
 
You have two options:
1. Find newer drivers for your Wi-Fi interface or USB3 controller, and integrate them into the install image.

2. Disable driver updates from WU. From NTLite Settings:
Windows Update / Automatic driver update mode -> Never
Windows Update / Automatically update device drivers and icons over the Internet -> Disabled

If you want to re-enable them after install, you can add a reg file to reverse the changes.
 
That's more or less what I thought, I'm going to disable it in ntlite or unattended.xml specialize, or even try to close the Windows update sc tasks processes later I can reactivate in firstrun and when everything is installed. Thank you, Garlin
 
If you want a sneaky trick, you can temporarily fool WU into thinking the PC is offline.

By disabling NCSI probes, Windows thinks there's no connection back to the MS servers and stops looking for updates. The network is unaffected, but Windows uses the probe's status to believe whether it should skip over network updates during OOBE.

1. Integrate DisableNCSI.reg into install.wim
2. Run EnableNCSI.cmd after you're finished. This reverts the reg changes, and allows Windows to resume background updates. If you want, just copy the commands into your OOBE.cmd.
 

Attachments

  • DisableNCSI.zip
    706 bytes
George King

My friend, have you figured out why your beautiful script hasn't been working for some people?

Well I have.
George King, many folks are used to removing the USB after setup has copied the files; even the setup asks to do so or used to if I recall.
Well that completely derails your RunOnce which depends on being able to find the files which depends on the USB being plugged in.
You should provide a version which copies the setup, office and updates folders if they contain applicable files.
If you don't just know that your script is against Windows Philosophy that is Copy ALL Needed Files to be independent.
Of course keep your normal version too; the file copying time may be unbearable for some hardcore fanatics; 5GB+.

Also George King, if the distribution that your script is being applied too has "first logon animation", well all your cool effects could be hiding behind it as was the case with I, and I now have proper justification for expelling that from my release. How did I detect this, you ask? SHIFT + F10 which got the tail end of your script; first logon animation was taking forever.

There is no need to add a RunOnce to NTLite; great work just small oversight with a big impact.
 
Other considerations are:

1. You should apply registry tweaks first; i.e., for fixing referral error which prevents setups from continuing.
Currently you Install MSI first, than EXE, than Reg Tweaks, than scripts.

2. You should inject the following code into all powershell scripts to ensure they run or update your Tutorial:

Code:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
ECHO 'Y'
 
Back
Top