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.
You don't need an Internet connection to network two PCs.
> 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.
I suspect you are making things more difficult for yourself than you need to.
Cross-posting to WSUS.
Good luck
Robert Aldwinckle
---
>> 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.
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.
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.
Thanks again.
> 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.
No, it'll be an internal mechanism, subject to change.
The WUA API includes import and export functions; have you tried using these?
Harry.
> 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!
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.
Harry.
Any documentation concerning import/export functionality of WSUS would be in
the =WSUS= SDK, not the WUA SDK.
--
Lawrence Garvin, M.S., MCBMSP, MCTS(x4), MCP
Senior Data Architect, APQC, Houston, Texas
Microsoft MVP - Software Distribution (2005-2008)
MS WSUS Website: http://www.microsoft.com/wsus
My Websites: http://www.onsitechsolutions.com;
http://wsusinfo.onsitechsolutions.com
My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin
>>> 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!
>>
>> 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:
>
> Any documentation concerning import/export functionality of WSUS would
> be in the =WSUS= SDK, not the WUA SDK.
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.
> 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>
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.
Thanks again!
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?