Re: XP Service Pack 2 in silent mode



Hi,

As David wrote, it is most likely an accept eula issue.

See the script in the link below for an example on the use of the
properties EulaAccepted and AcceptEula.

Windows Update Agent force script, email results
http://www.vbshf.com/vbshf/forum/forums/thread-view.asp?tid=199&start=1

Regards,
Torgeir

Dorel Sturm wrote:

Hi there,

I wrote here an application that uses the WUA COM interfaces (IUpdateSearcher, IUpdate etc.). I use this application to scan for available updates, download the updates and install them. Everything works OK until I get to download and install the XP Service Pack 2. I get this update when I use IUpdateSearcher.Search(), I can successfully download it (using IUpdateDownloader.Download()) but when I install this update using IUpdateInstaller2.Install() I cannot get rid of the user interface. When I launch my tool (a command line tool) the user interface comes up for XP SP2. My questions are:

- how can I avoid this user interface for XP SP2 from Windows Update Agent APIs?
- if I run my utility under the SYSTEM account (from a service) then installation of the XP SP2 will fail with error 0x80240020. Microsoft has an article about similar problem (http://support.microsoft.com/?kbid=910341) but I did all the steps there and I still get the error. I think that the user interface for XP SP2 should show up but it cannot because my application is running under the SYSTEM account (however the current logged on user is an administrator). Any ideas?

Here is the code that I use in my application:

///////////////////////////////////////////////////////////////
Set us = CreateObject("Microsoft.Update.Session")
Set Updates = CreateObject("Microsoft.Update.UpdateColl")
Set Download = us.CreateUpdateDownloader()
Set usearch = us.CreateUpdateSearcher()
Set usresult = usearch.Search("Type='Software' and UpdateID='7477af62-8f9b-4f32-9daf-7aB452e52396'") ' ID of XP SP2 update

Set ourUpdate = usresult.Updates.Item(a)
Updates.Add (ourUpdate)

Download.Updates = Updates

Set result = Download.Download() ' download works OK

Set Install = us.CreateUpdateInstaller() ' create the installer
Install.ForceQuiet = true
Install.Updates = Updates
Set installed = Install.Install() ' and install the installers. However for XP SP2 this shows the user interface
' but not for other updates...
//////////////////////////////////////////////////////////////


Thanks for your help.

--------------------------------------------------------------------------
Dorel Sturm
Germany




--
torgeir, Microsoft MVP Scripting, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
.



Relevant Pages

  • "View Installation History" for WU5 without using the WU Web site
    ... Below is a VBScript that extracts information about installed updates ... Tested on Windows XP SP2 only. ... Install mechanism: WindowsUpdate ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windowsxp.general)
  • "View Installation History" for WU5 without using the WU Web site
    ... Below is a VBScript that extracts information about installed updates ... Tested on Windows XP SP2 only. ... Install mechanism: WindowsUpdate ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windowsupdate)
  • Re: Sasser in ms updates?
    ... > The following updates were being downloaded: ... You can install KB835732 from here: ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.security.virus)
  • Re: XP SP2 Download Failure, error code 80072F78
    ... > download and get to the Install button. ... When I check in the Install ... all the updates have error code 80072F78. ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windowsupdate)
  • XP Service Pack 2 in silent mode
    ... available updates, download the updates and install them. ... OK until I get to download and install the XP Service Pack 2. ... IUpdateInstaller2.InstallI cannot get rid of the user interface. ...
    (microsoft.public.windowsupdate)

Quantcast