jcarle Posted October 31, 2006 Share Posted October 31, 2006 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" CThe 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 offC:cd "\Program Files\Windows Updates Downloader"wud -automated "windows-xp-x86-enu.ul" "C:\XPUPDATES" CIF ERRORLEVEL 15 GOTO DownloadErrorIF ERRORLEVEL 14 GOTO ProxySettingsErrorIF ERRORLEVEL 13 GOTO NoUpdateTypeIF ERRORLEVEL 12 GOTO DownloadFolderInvalidIF ERRORLEVEL 11 GOTO UpdateListNotFoundIF ERRORLEVEL 1 GOTO CancelledGOTO Completed:DownloadErrorecho Download error.echo:pauseGOTO End:ProxySettingsErrorecho Proxy settings error.echo:pauseGOTO End:NoUpdateTypeecho No update type chosen.echo:pauseGOTO End:DownloadFolderInvalidecho Download folder invalid.echo:pauseGOTO End:UpdateListNotFoundecho Update List not found.echo:pauseGOTO End:Cancelledecho Cancelled.echo:pauseGOTO End:CompletedC:cd "\Program Files\nLite"nLite:End Link to comment Share on other sites More sharing options...
Recommended Posts