Go Back   TechArena Community > Technical Support > Computer Help > Windows XP > Windows Update
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Windows Update Agent API - download links / installation

Windows Update


Reply
 
Thread Tools Search this Thread
  #1  
Old 04-03-2008
PaqDev
 
Posts: n/a
Windows Update Agent API - download links / installation

I am using the Windows Update Agent API and the WSUSSCN2.CAB file to scan for
missing updates on machines that do not have Internet access. The scans work
fine. Since I cannot use the WUA API to download and install the updates (no
Internet connection), I obtain the patch download links for the missing
updates via the WUA API. I then use these download links to download the
update installation files onto a server that has Internet access and then
copy the updates from this server to the machine that does not have Internet
access. I then simply shell out and execute the update files one at a time.

The problem I have is that the download links provided by the WUA API are
sometimes for CAB files rather than for EXE/MSI/MSU files. This occurs mostly
in Vista machines, but I have run across other cases. So, I cannot just
shell out to install these updates. I know that if I go to the Microsoft
site to manually download an update, I will get an EXE/MSI/MSU file rather
than a CAB file.

Is there some way to obtain the download links for EXE/MSI/MSU files via the
WUA API rather than the links for CAB files? Alternatively, is there some
way to get the installer in WUA API to install one of these CAB files by
providing a location on the local machine to which the CAB file was copied
without having to use the WUA API to actually perform the download? I have
not found anything in the WUA API documentation that deals with these
questions.

Reply With Quote
  #2  
Old 04-03-2008
tear_of_love.310@hotmail.com
 
Posts: n/a
You don't need an Internet connection to network two PCs.

I suspect you are making things more difficult for yourself than you need to.
Cross-posting to WSUS.
Reply With Quote
  #3  
Old 06-03-2008
Harry Johnston [MVP]
 
Posts: n/a
Re: Windows Update Agent API - download links / installation

It may be worth investigating WSUS. Start here:

<http://technet.microsoft.com/en-us/wsus/default.aspx>

If you're determined to use the WUA API, it should be possible to
reverse-engineer the way the CAB files are installed. Look at the content from
a few of them and I'd guess it will be fairly obvious how to install them.

Harry.
Reply With Quote
  #4  
Old 08-03-2008
PaqDev
 
Posts: n/a
Thanks for the reply.

I already had tried the "reverse-engineer" approach, but the WUA API
download object does a lot more than just download the CAB file. It creates
files and/or directories under the <Windows>\SoftwareDistribution\Download
directory that are anything but obvious, and it makes entries in a database
(<Windows>\SoftwareDistribution\DataStore\DataStore.edb) concerning the
download for use by the WUA API installer object. Unfortunately, I haven't
found any documentation for any of this. I had hoped that in MS's new spirit
of open documentation, someone might have found something on this that I
haven't discovered.

No, it'll be an internal mechanism, subject to change.

The WUA API includes import and export functions; have you tried using these
Reply With Quote
  #5  
Old 11-03-2008
PaqDev
 
Posts: n/a
Re: Windows Update Agent API - download links / installation

I haven't found anything concerning import and export functions in the WUA
API documentation. I hate to be a pain, but can you point me someplace?
Thanks!
Reply With Quote
  #6  
Old 12-03-2008
Harry Johnston [MVP]
 
Posts: n/a
I can't find the methods I was thinking of - perhaps they're gone, perhaps I'm
looking in the wrong place - but these might (perhaps) present a solution:

<http://msdn2.microsoft.com/en-us/library/aa386884(VS.85).aspx>

<http://msdn2.microsoft.com/en-us/library/aa386101(VS.85).aspx>

Remember that the offline catalog isn't really designed for this purpose so you
may be out of luck.

Any documentation concerning import/export functionality of WSUS would be in
the =WSUS= SDK, not the WUA SDK.
Reply With Quote
  #7  
Old 13-03-2008
Harry Johnston [MVP]
 
Posts: n/a
Re: Windows Update Agent API - download links / installation

You're thinking of import/export of the WSUS database. We're talking about
packages on the client side.

I found the thread I was looking for, once I realised it was in
microsoft.public.security.baseline_analyzer rather than here. Turns out the
methods were CopyToCache and CopyFromCache; I was misremembering the names.

Harry.
Reply With Quote
  #8  
Old 13-03-2008
Harry Johnston [MVP]
 
Posts: n/a
Re: Windows Update Agent API - download links / installation

I found the thread I'd been looking for. These are the references:

<http://msdn2.microsoft.com/en-us/library/aa386878(VS.85).aspx>

<http://msdn2.microsoft.com/en-us/library/aa386101(VS.85).aspx>

Seems I'd misremembered the method names so I was looking for the wrong thing.

The documentation doesn't really make it clear exactly how these methods
interact with the rest of the system or what their intended purpose is, so I'm
unsure whether they'll be useful or not.

... if you do get this working, I for one would be very interested to hear
about it, and to see the code if you are willing to release it.

Harry.
Reply With Quote
  #9  
Old 14-03-2008
PaqDev
 
Posts: n/a
Re: Windows Update Agent API - download links / installation

Thanks for your responses! I am using the DownloadContents to get the
download links. But, the CopyToCache method is interesting. I had not
really looked at that before, so I'll do some experimenting with it. If I
can figure out something with it, I'll be happy to post my results!

Thanks again!
Reply With Quote
  #10  
Old 05-05-2009
Tim
 
Posts: n/a
RE: Windows Update Agent API - download links / installation

Hi PaqDev,
How is this subject going? I have the same problem with you. I wish
you can share more information. Thanks.

I want to using WUA API in visual studio 6.0 . I have to add WUapi.h
and Wuguid.lib to my c++ project. but when I call
IUpdateServiceManager::AddScanPackageService() , I get a error that indicate
E_INVALIDARG .

do you have any surguesstion?
Reply With Quote
  #11  
Old 22-06-2009
Gary
 
Posts: n/a
Re: Windows Update Agent API - download links / installation

Hi,Ihave the similar problem,I wish you could share more information about
this subject.such as IUpdate::CopyFromCache.
Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows XP > Windows Update
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Windows Update Agent API - download links / installation"
Thread Thread Starter Forum Replies Last Post
Windows 7 - Windows Update Agent Version Deester Windows Update 4 24-06-2010 02:59 AM
Windows Update Agent 7.4.7600.226 BigRedWingsFan Windows Update 16 05-12-2009 08:13 AM
windows update agent dont work 72001788 error code 80070006 maarten Operating Systems 3 11-05-2009 08:30 AM
Windows Update Agent 5.8.02469 Mihalis Windows Update 10 28-04-2009 08:01 AM
MSN Messenger windows update agent 5.8.02469 etienne Windows XP Support 3 08-08-2008 11:04 PM


All times are GMT +5.5. The time now is 01:17 AM.