Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

WUD 3rd Party Integration


  • This topic is locked This topic is locked
No replies to this topic

#1
jcarle

jcarle

    MSFN Master

  • Developers
  • 2,579 posts
Starting with version 2.23 build 842, Windows Updates Downloader now supports command-line parameters for 3rd party integration.

In other words, you can start WUD in automated mode, have it download critical updates and/or service packs via the command line and exit automatically once downloads are complete. Certain options are preconfigured to allow maximum compatibility and set in a way that makes sense in an automated mode.

In particular, take note of the following when running in automated mode:
  • The command line parameters must be declared in the same order as shown here.
  • The update list specified must be uncompressed.
  • The download folder must be pre-created.
  • The download folder path must not end with \ (Use C:\UPDATES, not C:\UPDATES\).
  • Product folders and category sub-folders are set to off.
  • Remove unlisted files is set to on.
  • Previously downloaded updates will not be re-downloaded unless deleted from the download folder.
  • You can choose to download either critical updates, service packs or both. You cannot download other types of updates in automated mode.
  • To enable proxy settings, you must configure them by running the program in normal user mode first.
To run WUD in automated mode, the command line parameters are as follows:
WUD -automated [updatelist] [downloadfolder] [updatetypes]
[updatelist] must be the filename of the update list to use.
[downloadfolder] must be the path to the folder where the updates should be downloaded to.
[updatetypes] must be C for critical updates, S for service packs, or C and S for both (no spaces). ei: C, SC, S, CS.

Example usage:
wud -automated "windows-xp-x86-enu.ul" "C:\XPUPDATES" C
The previous example would download all critical updates found in the windows-xp-x86.enu.ul update list into the C:\XPUPDATES folder.

The program will generate an errorlevel code (exit code) when exiting, which are as follows:
  • 0 - No error, download complete.
  • 1 - User cancelled the download.
  • 11 - The specified update list was not found.
  • 12 - The download folder is invalid or does not exist.
  • 13 - No valid update type was chosen.
  • 14 - There is a misconfiguration with the proxy settings.
  • 15 - An error occured while connecting or downloading updates.
The following is an example batch file which download all the critical updates, check for an error, and if no error occurs, start nLite.
@echo off

C:
cd "\Program Files\Windows Updates Downloader"

wud -automated "windows-xp-x86-enu.ul" "C:\XPUPDATES" C

IF ERRORLEVEL 15 GOTO DownloadError
IF ERRORLEVEL 14 GOTO ProxySettingsError
IF ERRORLEVEL 13 GOTO NoUpdateType
IF ERRORLEVEL 12 GOTO DownloadFolderInvalid
IF ERRORLEVEL 11 GOTO UpdateListNotFound
IF ERRORLEVEL 1 GOTO Cancelled
GOTO Completed

:DownloadError
echo Download error.
echo:
pause
GOTO End

:ProxySettingsError
echo Proxy settings error.
echo:
pause
GOTO End

:NoUpdateType
echo No update type chosen.
echo:
pause
GOTO End

:DownloadFolderInvalid
echo Download folder invalid.
echo:
pause
GOTO End

:UpdateListNotFound
echo Update List not found.
echo:
pause
GOTO End

:Cancelled
echo Cancelled.
echo:
pause
GOTO End

:Completed
C:
cd "\Program Files\nLite"
nLite

:End



How to remove advertisement from MSFN



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users



How to remove advertisement from MSFN