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

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'
 
To anyone reading this guide, NTLite natively has the capacity to integrate ps1, scripts and registry files, but there are several things to keep in mind. First, you should only integrate Local Machine registry entries prior to the first logon; because the user hasn't been created yet. REMEMBER that HKEY_ROOT infiltrates both Local Machine and HKEY_USERS; thus HKEY_CURRENT_USER, HKEY_ROOT, HKEY_USERS_SPECIAL keys must be integrated Post Setup. Also by default, NTLite is not providing any fancy UI to show you that it is working BUT if you protect the relevant files,

Code:
<ProtectedFiles>
  <File>*SysWoW64\*\iernonce.dll.mui</File>
  <File>*SysWoW64\iernonce.dll</File>
  <File>*SysWoW64\IEAdvpack.dll</File>
  <File>*System32\*\iernonce.dll.mui</File>
  <File>*System32\iernonce.dll</File>
  <File>*System32\IEAdvpack.dll</File>
</ProtectedFiles>

You Get :) the Post Setup UI as long as first logon animations are removed or disabled.
This is REGARDLESS of whether or not you have included the $OEM$ folder.
So if you don't need the additional capabilities of installing office, windows updates, office updates, applications and certificates.
Then you can disregard this entire guide.

Personally, I don't install applications. I slipstream them directly into the WIM and apply the relevant registry entries.
This is possible, but much more difficult to do with even with Microsoft Office; but this is Expert Level integration.
Installing takes time, slipstream is instant.
You can slipstream DirectX, OpenAL, XNA framework etc... Why charge computers an install fee where such frameworks do not need to adapt to specific hardware?
 
I prefer to integrate all HKLM, ROOT, HKCU registry keys via a REG file (from NTLite Registry page) and no problem
Like the settings of "portable apps", integrated into the image, etc...
Afterwards, I could only use HKLM and HKCU for other, but I don't want to bother with that, NTLite does what is necessary

Just a few that need to be "used" after installation, notably Windows customization
 
Last edited:
tted Thanks for feedback. Simply don't use my script if it don't fit's your need. NTLite integration into WIM/ESD is different thing, I'm only using updates + removals. Everything else I do on the fly. My WIM is small and everything dynamic. I can swap WIM and every configuration and app is there. And I don't have only one system WIM on my USB.

Registry can be integrated into default user, you don't need to do in tons of places.

And seems I have here really old RunOnceEx.cmd posted. I have much newer one, will consider to update first post when I have free time to do that.

P.S. Syspreping with Office and such other big things which are updated recently have no sense.
 
that is application i wanna install. when it finished, the only msi package was installed. i did the silent switch on single line in the TXT file. Something i missed?
 

Attachments

  • Installer.jpg
    Installer.jpg
    111.9 KB
Back
Top