Latest posts by Wolfgang Sommergut (see all)
- Scan, download and install Windows Updates with PowerShell - Mon, Mar 23 2020
- WinPE for Windows 10: Create an ISO or a USB stick - Mon, Mar 16 2020
- WIM Witch: Customizing Windows 10 images with a GUI - Tue, Mar 3 2020
With native servicing of Windows 10, however, the setup starts automatically. The administrator apparently has no other control option but to hold back the upgrades via WSUS or GPO. But this is not the case. The use of setupconfig.ini offers a relatively simple method to enter the parameters that you would otherwise pass to setup.exe on the command line.
Setting up the configuration file on PCs ^
Copy the setupconfig.ini file to the profile of the default user in the following directory before the feature update:
In centrally managed environments, Group Policy preferences can be used for this purpose. After the update is complete, the setup will delete this file; you'll have to create it again for the next update.
As is commonly known, the INI format comprises sections with headings in square brackets; the actual settings follow the pattern name=value.
For setupconfig.ini, you only need one header, namely [Setupconfig].
Many of the parameters supported by setup.exe are not relevant for upgrades that come via WSUS or Windows Update. Obviously, this is the case for specifying a WDS server, because with this method you do not have to boot the PC over the network or for the product key, which is retained from the previous version.
Switches not fully documented ^
However, Microsoft does not document in detail which switches are supported by setup.exe when upgrading from WSUS or Microsoft Update. For example, a feature update still passes the OOBE phase, but the user does not have to configure privacy settings or answer password security questions. Therefore,
is obviously irrelevant.
Other options, however, still work in this context. They provide the administrator with additional flexibility and increase the chance of successfully completing the update or eliminating errors more easily.
Ignoring compatibility warnings ^
For this task, setupconfig.ini should contain the following parameter:
This prevents Windows 10 from terminating setup prematurely due to possible compatibility warnings. The OS is often very sensitive in this regard and will be affected by the smallest conflicts, even if they do not jeopardize the success of the process.
This setting can be used to prevent the infamous failures that can occur due to the allegedly incompatible "Microsoft XPS Document Writer" and "Microsoft Print To PDF" features. Should serious incompatibilities occur, you would need to do proper troubleshooting anyway.
Preventing dynamic updates ^
Windows 10 uses dynamic updates (DU) to bring the system up to date before the actual upgrade, thus improving the chances of a successful installation of the new version.
Microsoft will apply the last cumulative update and then update problematic drivers. In addition, DUs renew the servicing stack, including setup.exe, and ensure that installed features on demand (FoD) and language packs are retained.
DUs are available as separate products in WSUS and can generally be provided through this channel for the upgrade. The only problem is that after Windows 10 1803, Microsoft stopped delivering dynamic updates via WSUS.
Instead, newer versions of the operating system get dynamic updates directly from Windows Update. The data volume can amount to several hundred MB per PC.
If a location has only a slow Internet connection, you should consider disabling dynamic updates to speed up the whole process. To do this, set:
However, this increases the risk that a feature update will fail. You will also have to install FoDs and language packs yourself.
Windows 10 behaves this way because the long-awaited Unified Update Platform got stuck halfway. Corporate customers are currently unable to benefit from it, but instead have to live with the effects of the changeover. It is unclear whether Windows 10 2004 can end this state.
Higher priority for the update process ^
The update normally runs in the background with low priority. If you have only a short service window to update the system, you can speed up the process by giving it more power. The entry responsible for this is:
Some blog posts recommend using the value High instead of Normal, but this is not documented in Microsoft's overview of the setup switches.
Script running at the end of the update ^
Several cleanup or adjustments tasks can remain pending after the installation. The automatic execution of a script before the user can log on again provides the admin an effective tool for this purpose.
In the setupconfig.ini file, enter such a script as follows:
An obvious use case would be to remove unneeded store apps. In the newer versions of Windows 10, apps do not return after the update if they have been removed; if you failed to clear out these OS add-ons in the past, here's your chance.
This task requires the Remove-AppxProvisionedPackage cmdlet, but executing a PowerShell script directly would fail due to the default Execution Policy. Therefore, as described above, enter a batch file for PostOOBE and start PowerShell from within the .cmd file:
powershell.exe -ExecutionPolicy Bypass -File "C:\RemoveApps.ps1" -WindowStyle Hidden
To remove Zune Video, you could then insert this command into the RemoveApps.ps1 script:
Remove-AppxProvisionedPackage -Online -PackageName `
Further options ^
There are other parameters available for setupconfig.ini that may prove useful depending on your requirements. For example, log files can be copied with CopyLogs to a network drive for central error analysis. You can also control the behavior of the drive encryption during the update by using the BitLocker option with the possible values AlwaysSuspend, TryKeepActive, and ForceKeepActive.
The DiagnosticPrompt (Values: Enable | Disable) determines whether the troubleshooting prompt can be started during the update with Shift + F10.
Additional or updated drivers can be provided using the InstallDrivers option, which specifies the directory where the INF files are located.
Evaluating the logs ^
The setup not only writes an error log (setuperr.log) under c:\windows\panther during the update, but practically records every processed step in setupact.log. Therefore, it is easy to find out from this file whether the parameters contained in the setupconfig.ini file have been passed on to setup.exe. To do this, look for "cmdline" in the log file.
While it is relatively easy to check the success of a PostOOBE script, the effects of other settings are not so apparent. For example, you cannot see during the process whether dynamic updates have been downloaded from the Internet.
In addition, the effectiveness of certain values for the priority parameter cannot be recognized immediately. In this case, a look at setupact.log will also help. Here, you can use the timestamps to calculate whether a higher priority has accelerated the update.
The setupconfig.ini file can be used to control the Windows setup for feature updates if they are obtained via Windows Update or WSUS. It provides some options that can have a positive influence on the success and duration of the update. Another useful feature is the option to customize the installation with the help of a script before users log in for the first time.