Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Update > XP Service Pack 2 in silent mode

Reply
Thread Tools Display Modes

XP Service Pack 2 in silent mode

 
 
Dorel Sturm
Guest
Posts: n/a

 
      05-03-2006
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


 
Reply With Quote
 
 
 
 
Torgeir Bakken \(MVP\)
Guest
Posts: n/a

 
      05-04-2006
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/for...id=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/scr...r/default.mspx
 
Reply With Quote
 
Dorel Sturm
Guest
Posts: n/a

 
      05-09-2006
Hi,

Thanks for your help. In the script with the example how to use EulaAccepted
and AcceptEula I see that AcceptEula is called before downloading the
update. In my code I first download the update then I call AcceptEula and
finally I call install.

It's important to call AcceptEula BEFORE downloading the update?

Dorel Sturm

"Torgeir Bakken (MVP)" <Torgeir.Bakken-> wrote in message
news:%...
> 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/for...id=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/scr...r/default.mspx



 
Reply With Quote
 
CtA
Guest
Posts: n/a

 
      05-29-2009

Hi,
I want to search print drivers in Windows Update, currently searcher returns
drivers for the deviecs connected to the system.
Is there a way to enumerate drivers in the windows update.

Thanks

Charels


 
Reply With Quote
 
PA Bear [MS MVP]
Guest
Posts: n/a

 
      05-29-2009
No (and you should have started a new thread).

CtA wrote:
> Hi,
> I want to search print drivers in Windows Update, currently searcher
> returns
> drivers for the deviecs connected to the system.
> Is there a way to enumerate drivers in the windows update.
>
> Thanks
>
> Charels


 
Reply With Quote
 
CtA
Guest
Posts: n/a

 
      05-29-2009
Hi sorry about that.

In fact I thought about creating seperate thread, but later I felt guys
responded in the same thread could provide some light, since they have been
done similar work already.

Anyhow, your answer is NO, it won't allow to search a driver based on
hardware id unless the devnode for the device needs to be created in devtree.

"PA Bear [MS MVP]" wrote:

> No (and you should have started a new thread).
>
> CtA wrote:
> > Hi,
> > I want to search print drivers in Windows Update, currently searcher
> > returns
> > drivers for the deviecs connected to the system.
> > Is there a way to enumerate drivers in the windows update.
> >
> > Thanks
> >
> > Charels

>
>

 
Reply With Quote
 
PA Bear [MS MVP]
Guest
Posts: n/a

 
      05-29-2009
It's pretty hard to fool Mother Nature and even harder to fool Windows
Update detection logic.

If you need a driver update, get it from the manufacturer's website, not
Windows Update, to preserve your sanity.


CtA wrote:
> Hi sorry about that.
>
> In fact I thought about creating seperate thread, but later I felt guys
> responded in the same thread could provide some light, since they have
> been
> done similar work already.
>
> Anyhow, your answer is NO, it won't allow to search a driver based on
> hardware id unless the devnode for the device needs to be created in
> devtree.
>
> "PA Bear [MS MVP]" wrote:
>
>> No (and you should have started a new thread).
>>
>> CtA wrote:
>>> Hi,
>>> I want to search print drivers in Windows Update, currently searcher
>>> returns
>>> drivers for the deviecs connected to the system.
>>> Is there a way to enumerate drivers in the windows update.
>>>
>>> Thanks
>>>
>>> Charels


 
Reply With Quote
 
CtA
Guest
Posts: n/a

 
      05-29-2009
OEMs are providing thier drivers thru WU (becuase of inBox driver size
limitation), so if normal user want to use a particular device (and if the
driver is in WU), he should able to search it and get it. That's how PnP
works, but in case of PnPX, I don't know why MSFT is putting the security
restriction.
Standard user should be able to download and install the driver without
administrator privilege.
Also I don't know why WUA is not allowing to enumerate drivers available in
WU?
Is it because it could slowdown WU server performence?

"PA Bear [MS MVP]" wrote:

> It's pretty hard to fool Mother Nature and even harder to fool Windows
> Update detection logic.
>
> If you need a driver update, get it from the manufacturer's website, not
> Windows Update, to preserve your sanity.
>
>
> CtA wrote:
> > Hi sorry about that.
> >
> > In fact I thought about creating seperate thread, but later I felt guys
> > responded in the same thread could provide some light, since they have
> > been
> > done similar work already.
> >
> > Anyhow, your answer is NO, it won't allow to search a driver based on
> > hardware id unless the devnode for the device needs to be created in
> > devtree.
> >
> > "PA Bear [MS MVP]" wrote:
> >
> >> No (and you should have started a new thread).
> >>
> >> CtA wrote:
> >>> Hi,
> >>> I want to search print drivers in Windows Update, currently searcher
> >>> returns
> >>> drivers for the deviecs connected to the system.
> >>> Is there a way to enumerate drivers in the windows update.
> >>>
> >>> Thanks
> >>>
> >>> Charels

>
>

 
Reply With Quote
 
PA Bear [MS MVP]
Guest
Posts: n/a

 
      05-29-2009
If the detection engine detects that a particular piece of hardware is
installed and if there's an available driver update in the WU database, the
driver update usually will be offered to the machine. WYSIWYG.

CtA wrote:
> OEMs are providing thier drivers thru WU (becuase of inBox driver size
> limitation), so if normal user want to use a particular device (and if the
> driver is in WU), he should able to search it and get it. That's how PnP
> works, but in case of PnPX, I don't know why MSFT is putting the security
> restriction.
> Standard user should be able to download and install the driver without
> administrator privilege.
> Also I don't know why WUA is not allowing to enumerate drivers available
> in
> WU?
> Is it because it could slowdown WU server performence?
>
> "PA Bear [MS MVP]" wrote:
>
>> It's pretty hard to fool Mother Nature and even harder to fool Windows
>> Update detection logic.
>>
>> If you need a driver update, get it from the manufacturer's website, not
>> Windows Update, to preserve your sanity.
>>
>>
>> CtA wrote:
>>> Hi sorry about that.
>>>
>>> In fact I thought about creating seperate thread, but later I felt guys
>>> responded in the same thread could provide some light, since they have
>>> been
>>> done similar work already.
>>>
>>> Anyhow, your answer is NO, it won't allow to search a driver based on
>>> hardware id unless the devnode for the device needs to be created in
>>> devtree.
>>>
>>> "PA Bear [MS MVP]" wrote:
>>>
>>>> No (and you should have started a new thread).
>>>>
>>>> CtA wrote:
>>>>> Hi,
>>>>> I want to search print drivers in Windows Update, currently searcher
>>>>> returns
>>>>> drivers for the deviecs connected to the system.
>>>>> Is there a way to enumerate drivers in the windows update.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Charels


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Silent Install Network service RSen Windows Vista Drivers 0 04-12-2007 04:58 PM
Re: Outlook Express 6 Service Pack 1 and Internet Explorer 6 Service Pack 1 updates Lucy [MSFT] Windows Update 0 04-30-2004 11:26 PM
--Service Pack--OE Blocks All E-mail Attachments Since Downloading Service Pack Lyssa Windows Update 1 02-12-2004 02:56 PM
SUS Auto Update only when no user logs on? (Or Silent mode) Mark Hanford Windows Update 2 11-25-2003 11:23 AM
818529 June 2003 Service Patch for IE6, Service Pack 1 Brian Windows Update 1 08-11-2003 07:42 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59