Batch offline install of downloaded updates?

Windows XP Professional Update Pack discussion.
Post Reply
avamk
Posts: 16
Joined: Thu May 08, 2014 2:21 am

Batch offline install of downloaded updates?

Post by avamk » Sun Nov 27, 2016 9:52 pm

Hello,

I've recently learned of the registry tweak for Windows XP SP3 that allows Windows/Microsoft Update to detect, download, and install POSReady updates.

Since these POSReady updates are still being released (and will be until 2019 I think), I would like to maintain my own offline collection of these updates for batch installation on other Windows XP installations. To be clear, I'm not looking for an update pack to slipstream, I just want to have my own archive of installers for those updates.

So far, I have been able to use the Windows Update MiniTool to select and download the updates I want. I collected these updates into a folder.

Next, I found a batch script (https://www.symantec.com/connect/articl ... ws-updates) that can batch install all updates in an arbitrary folder.

However, this script requires qchain.exe, which I can no longer find on microsoft.com (I tried the link that article, and following it leads to dead links to download qchain.exe).

So, is there another way to obtain qchain.exe OR is there another way to install any/all updates I have in a folder?

Ideally, I would love to get a batch script (or equivalent process) that can:
  1. Look for all offline update files in a folder
  2. Determine which ones have already been installed so they can be skipped.
  3. Install all of the updates in that folder.
  4. (Best if this script can be used for Windows XP and up (including 7 and later)).
How can I do this? Thanks!

P.S. I know there's WSUS Offline Update, but it no longer runs on Windows XP nor does it support Windows XP anymore. The last version with XP support is 8.9, but it doesn't allow me to select and download those POSReady updates (or any other updates for that matter). It only downloads all updates (w/o POSReady ones).

User avatar
bphlpt
Posts: 1362
Joined: Sat Apr 19, 2008 1:11 am

Re: Batch offline install of downloaded updates?

Post by bphlpt » Sun Nov 27, 2016 10:48 pm

While you can find qchain.exe via the WayBack Machine - for example, it seems that qchain.exe is no longer required since XP SP1. See here for explanation and some suggestions in that link and other referenced links.

Cheers and Regards

Zephyr
Posts: 48
Joined: Sun Nov 22, 2015 4:53 pm
Location: London

Re: Batch offline install of downloaded updates?

Post by Zephyr » Sat Dec 10, 2016 11:48 am

I have found a Visual Basic script to batch install Windows security updates offline in the MSU, MSP, EXE and CAB formats. Once you have collected the updates into a folder the script will prompt you to specify it's path. The script also writes a log file to the updates folder showing which updates failed to install with an exit code. I have never tried this but I have read statements at various sites to the effect that the batch installers will skip the installation of updates that have already been installed. https://www.symantec.com/connect/downlo ... lly-folder

This batch file will install security updates offline, but it is intended for MSU files and I am not sure that it can be modified for EXE files.

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
FOR /R “%~dp0” %%A IN (*-KB*.MSU) DO (
CALL :SUB %%~nA
ECHO= Installing KB!KB_NUM!
>NUL TIMEOUT /t 3
WUSA “%%A” /quiet /norestart)
ECHO= == Press any key to restart ==
>NUL PAUSE
SHUTDOWN.EXE /r /t 0
GOTO :EOF

:SUB
SET “KB_NUM=%*”
FOR /F “DELIMS=-” %%B IN (“%KB_NUM:*-KB=%”) DO SET “KB_NUM=%%B”

Here is a simpler version of the above:

@Echo off
For %%# in (*.msu) Do (
Echo: Installing update: %%#
Wusa "%%#" /quiet /norestart
)
Echo Windows Update finished.
Pause&Exit
XP FOREVER!

avamk
Posts: 16
Joined: Thu May 08, 2014 2:21 am

Re: Batch offline install of downloaded updates?

Post by avamk » Tue Dec 13, 2016 6:47 pm

Thanks @bphlpt about qchain, I was able to find it.

That said, I'm excited to see the VB script that Zephyr has linked to. I'll try it as soon as I get back and regain access to my VM machine. If it works I can just use that and not have to worry about qchain. Thanks for posting it!

avamk
Posts: 16
Joined: Thu May 08, 2014 2:21 am

Re: Batch offline install of downloaded updates?

Post by avamk » Mon Dec 19, 2016 6:24 pm

Zephyr wrote:I have found a Visual Basic script to batch install Windows security updates offline in the MSU, MSP, EXE and CAB formats. Once you have collected the updates into a folder the script will prompt you to specify it's path. The script also writes a log file to the updates folder showing which updates failed to install with an exit code. I have never tried this but I have read statements at various sites to the effect that the batch installers will skip the installation of updates that have already been installed. https://www.symantec.com/connect/downlo ... lly-folder
Finally got a chance to try this. Except for a few updates that didn't work, the rest of the post-SP4 POSReady updates installed succesfully!

Here is my current workflow:

1. With nLite, slipstream SP4 into a stock Windows XP SP3 installation media.

2. Use nLite to remove a few components that I really don't like, e.g. Movie Maker, Outlook Express, Windows Tour, MSN Explorer, etc.

3. Install it into a virtual machine.

4. In the virtual machine, run Windows Update Mini-Tool to get a list of updates and their download URLs.

5. Use the host machine's Firefox's DownloadThemAll add-on to download all those updates, place them in a folder.

6. Use the VBScript to install the updates in that folder. Done.

Thank you so much Zephyr and everyone for your help over the past several weeks :lock: , I think I'm finally getting close to the install ISO I've always wanted to make!! :)

Post Reply