Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Muppet Hunter

Batch hotfix downloading

Recommended Posts

Updated May 5th 2011

Note that at the moment this only works for English 'ENU' updates.

This is now using aria2 instead messing around with wget. It uses a simpler batch which calls aria2 to parse a list of direct urls and will download in parallel (wget does it serially). If you don't want a file then just comment the file out with an octothorpe (#) and do likewise with the HF=XYZ on the next line.

Get the latest stable version of aria2, currently 1.11.1 (get the file with mingw32msvc in its name)

aria2

Vanilla : IE6, WMP9, MSI 3.1, Win Messenger 4.7 + Common Upates + Common Bugfixes

vanilla.zip

Regular : IE8, WMP11, MSI 4.5, Win Messenger 5.1 + Common Upates + Common Bugfixes + IMAPI v2

regular.zip

Extra : Regular + Extras & Upgrades + Group Policy + WGA + Bugfixes (from Less Essential Updates) + Windows/MS/Office Updates

extra.zip

Instructions

1/ Extract aria2c.exe into the hfslip root directory

2/ Unzip the batch and filelist from whatever file from above (ie Extra, Vanilla or Regular) into the hfslip root directory

3/ Click on the batch file in Window$ Explorer (or run from the command line)

4/ Follow the instructions and manually download anything that aria2 isn't capable of getting into the appropriate folder (this usually means downloading the regfiles)

[until the hotfix list is updated EPA Enable (regfile) is here and latest Adobe Fla$h is here]

5/ Just download the new batch each month (rarely mid-month) to keep updated (new releases will be announced here)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When I took over TommyP's XP Update List he gave me a copy of a spreadsheet he wrote for the purpose of making the list's web page. You put the details of each hotfix in (filename, url, kb number etc) and the webpage is automagically created. I noticed when I went to download updates via my list that on the confirmation page there is a manual link to start the download. I noticed the page url had the same 'familyId=' part as the page I had clicked from. You go from microsoft.com/downloads/details.aspx?familyId= to microsoft.com/downloads/en/confirmation.aspx?familyId=

Anyway, I programmed the spreadsheet to get the familyid code and make a link for the confirmation page (containing the full download link). I had used wget in the past to grab certain filetypes from various sites to save me from having to click around and I saw that it could be used to scan each page and configured to follow the link to download the hotfix. The spreadsheet outputs a batch script which does all this for each hotfix in my update list. I added a column which lets you select any update that you want to ignore, ie any file you never need (rather than any file you already have). You just write any character in the cell and the link is gone.

The script will remove recent obsolete updates (from the last 3 months) and download each current update to the appropriate folder (HF, HFCABS etc). If you run the script from the hfslip root directory then any existing files should be left alone because of Wget's no_clobber setting. To make the script, just highlight cells in the M column from 'echo deleting obsolete updates' down to 'pause' (M7 to M167). Copy & paste into a text editor and save as hfpicker.bat. For the Wget config settings, in the same way copy A173 to A231 and save as wget.ini. Wget can be got here.

I didn't know a massive amount about the situation with non-ENU hotfixes, eg which locale codes are used, availability for each locale etc. Eventually I found another confirmation link (without '/en/' in the middle) of the form microsoft.com/downloads/thankyou.aspx. I can't properly test this as my locale is English and it might not even work, but the thankyou link ought to autodetect your locale and supply the appropriate file. I've put two worksheets together - one for ENU called Original and one called Multilang for non-ENU. The ENU one should be a little faster because of fewer redirects.

There are certain hotfixes which need a direct link (mostly to bypass validation) and I've put the ENU link for these in the C column. In the Multilang sheet these lines have been 'marked' out to prevent mixing up the different languages. If anyone posts up direct links to non-ENU versions of these updates I'll see if they can be used for the benefit of others. In the meantime you can put these links in yourself and unmark as necessary. It might be possible in future to add in language selection which could be used to select the direct links based on an entered locale. Cell A5 is intended for this, but at the moment it just changes the language string in the (spoofed) user-agent used by Wget (cell A228). I'm not at all sure how the MS site detects locale, but I have unsuccessfully tried pretending to be pt-BR using various settings (I can only download PTB updates using a browser at the moment).

The spreadsheet is attached, please download and test. At least for the moment it's not intended for further redistribution or business use. Copyright TommyP and Muppet Hunter.

hfpicker.zip

hfpicker_ml.zip

Edited by Muppet Hunter

Share this post


Link to post
Share on other sites

That could help save a lot of time each time one have to rebuild his unattended xp.

Let me look into it and keep encouraging you in your helpful work.

Share this post


Link to post
Share on other sites

This is Great, Muppet Hunter! _-X-_ has a batch file that effectively does the same thing available on his site here - http://win-x.co.cc/updates.html, His downloads the list from his site and yours obviously does it from yours. Same thing for Windows Updates Downloader available here - http://www.windowsupdatesdownloader.com/. But the great thing about yours is that it puts the updates in their correct folders for use by HFSLIP! Fantastic! Combining this with the update checker script from mim0, and we don't have any excuse for screwing up an HFSLIP run anymore! Keep up the great work!

Cheers and Regards

Share this post


Link to post
Share on other sites

I think mine is the only one which * might * be able to easily 'sniff' the multilingual fixes without manually chasing up the direct urls. I say 'might' because I need someone with a non-English setup to test this out. Thanks for the feedback :)

Share this post


Link to post
Share on other sites

That sounds really cool!!!

...Combining this with the update checker script from mim0, and we don't have any excuse for screwing up an HFSLIP run anymore! ...

Hrhr... the file-checker has an undocumented INI-setting: DOWNLOAD-COMMAND :)

Example:

DOWNLOAD-COMMAND=hfpicker.bat

The download-command will be called for every file which is not found and which is not to be ignored.

the download-command expects 2 parameters:

1 - name of the file to download

2 - destination folder

I use DOWNLOAD-COMMAND for a while for collecting my updates when I start with empty HFSLIP-folders. But I don't really download it... I've downloaded my files manually and I grab it from my external HDD with another script which I use as download-command.

@MH: Are there dl-links for any language inside? I saw a page "multi-lang" but how to set the lang?

Edited by Mim0

Share this post


Link to post
Share on other sites

@Mimo

There are just generic links in the spreadsheet, let me explain.

The spreadsheet has two sheets inside. One has links of the form /downloads/en/confirmation.aspx?familyId=e2acde20-a6d3-4135-b6eb-1214f743d474 for ENU hotfixes. The other sheet has links of the form /downloads/thankyou.aspx?familyId=e2acde20-a6d3-4135-b6eb-1214f743d474 which (for some languages) redirects to the confirmation.aspx link.

On the confirmation.aspx page it says 'if your download does not start after 30 seconds, click here: Start download'. It's this link that wget follows. To complicate things further, on both pages I have seen &displaylang=en appear at the end of the url.

At first I thought that I could try /downloads/pl/confirmation.aspx...&displaylang=pl for Polish, but this didn't work. It was then I found the thankyou.aspx link where I could just change the language by changing the end of the url to &displaylang=pl.

I tried the portugese-brazilian link in my browser and I got the PTB file. With wget it doesn't work. I was hoping that it's not working because I have an ENU locale, but it might be a browser cookie issue.

The only language setting in my spreadsheet is in A228 of the Multilang sheet for the user-agent string. There is a header accept-language option somewhere within wget but I found it made no difference. There's also a way of setting cookies in wget which I haven't tried yet.

Edited by Muppet Hunter

Share this post


Link to post
Share on other sites

puh.. sounds complicated...

I thought you could create a list of download-urls for (at least nearly) all files in all langs. With this list I/you could write a download-command for the file-checker (should be just a few lines).

Share this post


Link to post
Share on other sites

Once the multi-language issues are resolved and we have a chance to play with this for awhile, if this was folded into the file checker, maybe then it could be set up for Muppet Hunter to be able to provide his list as a possible input for those that prefer a leaner XP installation, just like Mim0 for a full featured XP installation, and Parseus for Win2k, and ??? for 2003, and ??? for XP64, and ...? Just a thought.

Cheers and Regards

Share this post


Link to post
Share on other sites

Mimo, using one url to get any language would make things far easier. With direct links you'd just put them in a list and use wget -i list.txt. The hard bit would be getting all the links!

Share this post


Link to post
Share on other sites

I've found that with an example update (WindowsXP-KB977914-x86-ENU.exe) the main difference between both download links are:

English:

http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=a9beb2bd-e5f6-43f9-bbcc-a2afee5e5ceb&displayLang=en

Spanish:

http://www.microsoft.com/downloads/es-es/confirmation.aspx?familyId=a9beb2bd-e5f6-43f9-bbcc-a2afee5e5ceb&displayLang=es

But not the same when the direct download link is generated:

English:

http://download.microsoft.com/download/0/F/B/0FBD2439-11BE-4CA6-A1DC-29766DFF4FC8/WindowsXP-KB977914-x86-ENU.exe

Spanish:

http://download.microsoft.com/download/A/F/0/AF023ADE-582D-409B-BEEF-7CAB8CB87EF3/WindowsXP-KB977914-x86-ESN.exe

Seems that the main difference is the language codes used by microsoft (not the same for the files than for the download links). Don't know if you already noticed it, hope that this helps, love your idea :yes:

Share this post


Link to post
Share on other sites

Lol, this is what happens when you post before (well) reading, you can politely ignore it :}

Still looking for something that could help.

Share this post


Link to post
Share on other sites

Spanish works! If you have Spanish Windows then you can probably omit &displaylang=es but the trouble I found was that some languages didn't seem to work using the links containing confirmation.aspx eg :-

www.microsoft.com/downloads/pl-pl/confirmation.aspx?familyId=a9beb2bd-e5f6-43f9-bbcc-a2afee5e5ceb&displayLang=pl

or any combination using pl & pl-pl.

In a browser, the following thankyou.aspx link works for me (and also works for &displaylang=es) :-

www.microsoft.com/downloads/thankyou.aspx?familyId=a9beb2bd-e5f6-43f9-bbcc-a2afee5e5ceb&displayLang=pl

It would be simpler if the thankyou.aspx links worked as in theory these should work for all languages. The trouble is wget can't grab this link and download the file for reasons I can't work out (I get the ENU file instead). I've tried all sorts of wget options and I can only think it's because my system locale is English and not Polish. With the confirmation.aspx links, maybe it only works with some of the main world languages eg French, Spanish etc. When I get a spare moment I'll put up a new spreadsheet.

If anyone wants to help test, then the wget command line options to use are :-

wget -r -H -np -l1 -nd -nH -nc -c --max-redirect=2 -A cab,exe,msi,thankyou.aspx,confirmation.aspx -Dwww.microsoft.com,download.microsoft.com --referer="http://www.microsoft.com" --ignore-case --no-cookies -U "Mozilla/4.0 (Windows; MSIE 8.0; Windows NT 5.1; SV1)"

Edited by Muppet Hunter

Share this post


Link to post
Share on other sites

Except for about 10 hotfixes which need a direct link (eg for wga validation), this should now work for English, French, German and Spanish updates. For anyone wanting to fill in the blanks, the direct links for each language are to be stored in AH to AK from row 37 down.

To skip any hotfixes just enter something different in the cell (eg skip!). IE6 and WMP9 updates are skipped by default.

Enter your hotfix language code (ie ENU,DEU,FRA or ESN) in cell L5.

Some non-language specific updates (eg most of the 'Required to access Windows Update' ones) have been marked with a language code to ensure that they get downloaded. Just ignore this.

I've fixed the deletion part of the script so that obsoletes are deleted regardless of language.

*** Note - it's still a work in progress and links have to be added/checked ***

hfpicker_ml.zip

Edited by Muppet Hunter

Share this post


Link to post
Share on other sites

Here's a couple of batch files which work with wget as described above to download all the main updates and have the previous 6 months of obsolete files automatically deleted.. I'm only doing this for ENU updates, but anyone is welcome to have a go themselves.

The batch file will download almost everything down to and including the Common Updates section in this list - http://www.vorck.com/windows/hotfixes_xp.html. Anything requiring manual download will be displayed at the start so you can copy and paste the link (currently these are Adobe Flash, Autorun Disable and a couple of Office Update files).

If you want any updates below the Common Updates section then open the bat file up in a text editor and comment out the leading REM statement. Similarly, if you don't want an update then just REM it out. (Note : Win Messenger 5.1 from the Extras & Upgrades section is downloaded by default for security reasons in the non-vanilla batch file).

To help with searching within the batfile, all updates are labelled by way of adding a REM at the end of each line.You can run Mimo's filechecker afterwards to see if any updates are missing.

Try and figure out any problems yourself as I don't use Windows at the moment and probably won't be able to troubleshoot.

*** To see what updates each batch downloads and to get the batches click here to go to the top post ***

Edited by Muppet Hunter

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...