Closed ferhaty closed 8 years ago
@ferhaty Cool, sounds interesting. Do you have a comparison installing all updates without and with this KB? Where should this KB script be added? Can you provide an updated Autounattend.xml?
@StefanScherer Sure. The updates on Windows 7 Enterprise SP1(64-Bit) are not installed by default without installing the hotfix. So I've added the hotfix batch file such that the updates are installed after the hotfix has been applied. The script should be applied before installing the Windows Updates. For example:
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c a:\hotfix-KB3102810.bat</CommandLine>
<Order>97</Order>
<Description>Install Windows Update Hotfix (KB3102810)</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\openssh.ps1 -AutoStart</CommandLine>
<Description>Install OpenSSH</Description>
<Order>99</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
<!-- END WITHOUT WINDOWS UPDATES -->
<!-- WITH WINDOWS UPDATES -->
<!-- Disable automatic updates so the system update process doesn't interfere with the update script -->
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c a:\microsoft-updates.bat</CommandLine>
<Order>98</Order>
<Description>Enable Microsoft Updates</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\win-updates.ps1 -MaxUpdatesPerCycle 30</CommandLine>
<Description>Install Windows Updates</Description>
<Order>100</Order>
<RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>
Error without the hotfix:
After the hotfix:
I've attached an example Autounattend xml. Autounattend.xml.zip
@ferhaty Great! Can I persuade you to add the updated Autounattend.xml to your PR?
@StefanScherer Sure I'll test the changes thoroughly and add it to the PR.
I think changing the Windows Update settings to something other than 'Install Updates Automatically (Default)' also fixes these errors:
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f
@StefanScherer added the changes to the PR
@StefanScherer my bad reverted the changes and added the installation of KB3102810 to the WITH WINDOWS UPDATES section. The hotfix should indeed be installed before searching for Windows Updates using microsoft-updates.bat. The search for Windows Updates takes too long and causes a timeout without the hotfix.
@ferhaty Thanks! I'll give it a shot in the next few days.
WOMM :shipit:
Thanks for the major cleaning task. I hadn't the time for tests.
… 64-bit. Installing and searching for updates is slow and high CPU usage occurs in Windows 7 SP1 (https://support.microsoft.com/en-us/kb/3102810).