There is a Windows Update Agent API. The IUpdateInstaller interface has an IsBusy property that seems to indicate that an update is in progress. This fragment of C++ may be a start. It seems to work in the sense that it tells me not busy :) but is otherwise untested.
#include "stdafx.h" #include <wuapi.h> #include <iostream> #include <ATLComTime.h> #include <wuerror.h> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { HRESULT hr; hr = CoInitialize(NULL); IUpdateSession* iUpdate; IUpdateSearcher* searcher; IUpdateInstaller* iInstaller; ISearchResult* results; BSTR criteria = SysAllocString(L"IsInstalled=1 or IsHidden=1 or IsPresent=1"); hr = CoCreateInstance(CLSID_UpdateInstaller, NULL, CLSCTX_INPROC_SERVER, IID_IUpdateInstaller, (LPVOID*)&iInstaller); VARIANT_BOOL Busy; hr = iInstaller->get_IsBusy(&Busy); etc.... --------------- Phil Wilson On Thu, Dec 11, 2014 at 2:19 PM, TimM <timmay...@smarttech.com> wrote: > Does anyone know of a way we can detect if there are pending Windows Updates > or currently running Windows Updates?We have seen this issue quite a lot > where we have 32 bit assemblies within our installs that get installed and > then published near the end of the install. But if there are pending Windows > updates or running Windows Updates they seem to conflict with our Assembly > publish stage and therefore our installs will fail with assembly 1935 errors > or simple assembly sxs errors.When these occur we get customers to run our > clean up tool, verify that all Windows updates have been applied and then to > re-run our installs. Once this is done the install is successful.We want to > try to prevent these errors and therefore if we can detect if there are > Windows Updates or updates that are running then we can have the install > inform the user to finish the Windows updates before launching the > install.We have seen these issues too many times and would like to find a > way to prevent these install errors.So if anyone has seen these types of > issues, knows how to fix them, and/or knows how to detect pending Windows > updates then please let me know.Thanks. > > > > -- > View this message in context: > http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Windows-Updates-either-pending-or-running-causes-our-installs-to-fail-tp7598536.html > Sent from the wix-users mailing list archive at Nabble.com. > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users