|
|
Other Options | |
---|---|
/autoaccepteulaFor some updates, an EULA (End-User License Agreement) has to be accepted by the user. With the option /autoaccepteula, all EULAs are accepted automatically before installing. So the update installation works without any user interaction, the process can be completely unattended. This works only if WuInstall is called by an administrator or a power user account. /logfile file-to-logThis option logs the console output of WuInstall to the specified log file (each output line also contains the current timestamp). For example, to log all already installed downloads: WUInstall.exe /search /criteria "IsInstalled=1" /logfile "c:\data\WuInstallLog.txt" WuInstallLog.txt contains for example the following lines: 2010/08/24-08:10:37 Searching for updates ... Criteria: IsInstalled=1 2010/08/24-08:10:40 2010/08/24-08:10:40 Result Code: Succeeded 2010/08/24-08:10:40 50 Updates found in total, filtering ... 2010/08/24-08:10:40 1. German Language Pack - Windows 7 (KB972813) Severity: Unknown 2010/08/24-08:10:40 UpdateClassification - Updates Product - Windows 7 Language Packs 2010/08/24-08:10:40 2. Windows Server Update Services 3.0 SP2 (KB972455) Severity: Unknown 2010/08/24-08:10:40 UpdateClassification - Service Packs Product - Windows 7 2010/08/24-08:10:40 3. French Language Pack - Windows 7 (KB972813) Severity: Unknown 2010/08/24-08:10:40 UpdateClassification - Updates Product - Windows 7 Language Packs This option is obviously very useful when testing and debugging WuInstall scripts or when running WuInstall with a scheduled job or on remote machines. Logfile variables
Examples: WUInstall.exe /search /logfile "c:\data\$DATETIME$_WuInstallLog.txt" Resulting logfile name is: 2018-05-28_09_43_45_WuInstallLog.txt WUInstall.exe /install /rebootcycle 3 /logfile "c:\data\$RCC$_WuInstallLog.txt" Resulting logfile name is: 3_WuInstallLog.txt → 2_WuInstallLog.txt → 1_WuInstallLog.txt This variables can also be used with all other log and xml options. /logfile_append file-to-logThere are also additional filename variables. /log_as_ansiThis option creates a ANSI-logfile. It must be combined with /logfile or /log_append. There are also additional filename variables. /maxruntime minutesFor example, with /maxruntime 5, WuInstall exits after 5 minutes displaying Maxruntime timeout elapsed: 5, exiting process! Use this option with caution, especially when using the /use_wsus or /bypass_wsus options! /simple_errorWith this option, WuInstall returns 0 for any success and 1 for any error, regardless of the reason. Simple result specified, returning 0 for success! Simple result specified, returning 1 for error! /show_progressThis feature is not recommended for the productive use of WuInstall! /offlineThis option is quite useful for searching already installed updates. The criteria "IsInstalled=1" and the /uninstall option automatically trigger an offline search. For example, check if the Update KB982214 is installed on a machine: WUInstall.exe /search /criteria "IsInstalled=1" /offline /match "KB982214" /offline specified, searching offline... Searching for updates ... Criteria: IsInstalled=1 Result Code: Succeeded 96 Updates found in total, filtering ... Listing those matching search expression: 'KB982214' 1. Security Update for Windows 7 (KB982214) Severity: Important UpdateClassification - Security Updates Product - Windows 7 When not using IsInstalled=1, the search result list usually contains the updates found at the last online search. /quietThe update-installer is forced to do an installation without user interaction. /disablepromptDisables showing source prompts to a user when installing the updates. /silentSuppresses any console output (log file option is still working). /donothing [retcode]WuInstall takes no action and returns the specified retcode, 0 by default. /xmlout fileThere are also additional filename variables. <?xml version="1.0" encoding="UTF-8"?> <wuinstall runtime_seconds="10" runtime="0d 00:00:10"> <system-info> <wuinstall-version>WuInstall Version 2.0 Pro (codename AE), Build 2014-02-03</wuinstall-version> <windows> <version>Microsoft Windows [Version 6.2.9200]</version> <service-pack>No Service Pack installed!</service-pack> <windows-update-agent> <major-version>8</major-version> <minor-version>0</minor-version> <product-version>7.9.9600.16384</product-version> </windows-update-agent> <domain>WORKGROUP</domain> <username>Michael</username> <computername>MICHAEL-PC</computername> </windows> <processor-architecture>x86</processor-architecture> <WOW64>true</WOW64> </system-info> <wsus></wsus> <parameters>/search /xmlout c:\tmp\wuinstall.xml</parameters> <updates count="1"> <update> <title>Definition Update for Windows Defender - KB2267602 (Definition 1.173.1428.0)</title> <description>Install this update to revise the definition files that are used to detect viruses, spyware, and other potentially unwanted software. Once you have installed this item, it cannot be removed.</description> <download_priority>Normal</download_priority> <eula_accepted>true</eula_accepted> <identity>4f25e1f8-186e-4d0b-b18c-6dab7c081c09</identity> <is_beta>false</is_beta> <is_downloaded>false</is_downloaded> <is_hidden>false</is_hidden> <is_installed>false</is_installed> <is_mandatory>false</is_mandatory> <is_present>true</is_present> <is_uninstallable>false</is_uninstallable> <kb_article_ids> <kb_article_id>2267602</kb_article_id> </kb_article_ids> <last_deployment_change_time>2014-05-06</last_deployment_change_time> <max_download_size>127745424</max_download_size> <min_download_size>0</min_download_size> <msrc_severity></msrc_severity> <recommended_cpu_speed>0</recommended_cpu_speed> <recommended_hard_disk_space>0</recommended_hard_disk_space> <recommended_memory>0</recommended_memory> <support_url>http://go.microsoft.com/fwlink/?LinkId=52661</support_url> <update_type>Software</update_type> <categories> <category> <id>e0789628-ce08-4437-be74-2495b842f43b</id> <description>A broadly-released and frequent software update containing additions to a product's definition database. Definition databases are often used to detect objects with specific attributes, such as malicious code, phishing Web sites, or junk e-mail.</description> <name>Definition Updates</name> <order>-1</order> <type>UpdateClassification</type> </category> <category> <id>8c3fcc84-7410-4a95-8b89-a166a0190486</id> <description>Windows Defender helps protect your computer against pop-ups, slow performance, and security threats caused by spyware and other unwanted software.</description> <name>Windows Defender</name> <order>-1</order> <type>Product</type> </category> </categories> <download_result_code>NotStarted</download_result_code> <download_hresult></download_hresult> <download_hresult_text></download_hresult_text> <installation_result_code>NotStarted</installation_result_code> <installation_hresult></installation_hresult> <installation_hresult_text></installation_hresult_text> <reboot_required>false</reboot_required> </update> </updates> <result> <search_result>Succeeded</search_result> <return_code>0</return_code> <return_text></return_text> <reboot_required>false</reboot_required> </result> </wuinstall> /includeRecommendedUpdatesIncludes recommended and optional updates. /IncludePotentiallySupersededUpdates 0|1Includes potentially superseded updates. /disable_ie_firstruncustomizeDisables the Internet Explorer 8 set up dialog. /targetgroup "targetgroup"/offlinescan "scanfile"http://go.microsoft.com/fwlink/?LinkID=74689 The .cab file must be on a local directory, a UNC path won't work. We suggest copying the .cab file into a local directory before executing WuInstall. This can be used to update computers, which don't have access to a WSUS, or to the internet. Therefore you have to combine it with the /install_cache option. First all updates have to be downloaded to the cache directory. You have to execute WUInstall as administrator to use this option, otherwise it won't work. /options [file://]|[http://]pathThis options allows it to specify the options in a file which is either on the disk (use file://) or available on the internet (use http://). In the options-file each option have to be in a separate line. /tempdir "path"Use this option to set the temp directory to the given path. By default the temp directory is set to %temp%. /forceThis option forces the update installation. /third_party_progress tagThis option adds additional output. Each line will start and end with the given tag. This makes it easier to parse the output. Following lines will be added: After searching and applying filters: %d updates matching filter - %d represents the number of matching updates Before each download: starting download %d/%d, (%s) - %d/%d for example starting download of the first of three (1/3) updates, (%s) the uuid of the current update After each download: finished download %d/%d, (%s) - %d/%d for example finished download of the first of three (1/3) updates, (%s) the uuid of the current update Before each installation: starting install %d/%d, (%s) - %d/%d for example starting install of the first of three (1/3) updates, (%s) the uuid of the current update After each installation: finished install %d/%d, (%s) result=%s - %d/%d for example finished install of the first of three (1/3) updates, (%s) the uuid of the current update, result=%s result status for the current installation Last line of output: return code: %d - %d overall return code from WuInstall For the installation output the /show_progress have to be used additionally. /refresh_last_update_timestampThis option refreshes the timestamps for the last successful search/install, which will be displayed in the Windows Update center. /UseUpdateService MicrosoftUpdate|WindowsUpdate|WSUS|DefaultThis option sets the specified service which will be used for searching for updates. /customActionBeforeWuInstall will execute the given action before it executes the other commands. /customActionAfterWuInstall will execute the given action after it has finished all other commands. /checkAvailableDiskSpace drive_key:min_free_space(KB|MB|GB)This option checks if the given drive has at least the specified amount of free space otherwise WuInstall will terminate with the return code 17 - NOT_ENOUGH_DISK_SPACE. /infoThis option prints the xml output after wuinstall has finished. It can also be used without any other command to display system information in xml format. /retrycountSpecifies the number of retries on search failure. Use this option when you try to update a machine which gets a lot of updates from a WSUS server. Obtaining a lot of updates from a WSUS can cause a search to fail (because of a limit from the WSUS which is not configurable). Perform multiple searches to get a result. /extended_errorUse this option to get a more specific return code as a bitmap:
|