Re: [WiX-users] Windows Updates - either pending or running causes our installs to fail
thanks David, I am using this to check whether updates are running or reboot required so my installer won't crap out I am thinking I might need to add another check to see if another installer is running (MSI not an update) m = Mutex::OpenExisting( mutexName ); where mutexName would be: Global\_MSIExecute cheers, Steve -- 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-tp7598536p7598960.html Sent from the wix-users mailing list archive at Nabble.com. -- New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Windows Updates - either pending or running causes our installs to fail
- Original Message - > From: Phil Wilson > To: General discussion about the WiX toolset. > > Cc: > Sent: Friday, December 12, 2014 11:30 AM > Subject: Re: [WiX-users] Windows Updates - either pending or running causes > our installs to fail > >T here 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. Cool - that did work. Cleaned up a little, and added support for pending. Tested on a system with an update that required rebooting and saw the busy during the update and reboot required after the install was done. I compiled this with VS2013 in a cmd window with just "cl filename.cpp" Dave #include #include #include #pragma comment(lib, "ole32.lib") int main() { if (!SUCCEEDED(CoInitialize(NULL))) return 1; IUpdateInstaller* iInstaller = NULL; if (!SUCCEEDED(CoCreateInstance(CLSID_UpdateInstaller, NULL, CLSCTX_INPROC_SERVER, IID_IUpdateInstaller, (LPVOID*)&iInstaller))) return 1; VARIANT_BOOL bVal; if (SUCCEEDED(iInstaller->get_IsBusy(&bVal))) { if (bVal) std::cout << "get_IsBusy: bVal!\n"; else std::cout << "get_IsBusy: Not so much\n"; } else std::cout << "get_IsBusy: Um, don't know\n"; if (SUCCEEDED(iInstaller->get_RebootRequiredBeforeInstallation(&bVal))) { if (bVal) std::cout << "get_RebootRequiredBeforeInstallation: bVal!\n"; else std::cout << "get_RebootRequiredBeforeInstallation: Not so much\n"; } else std::cout << "get_RebootRequiredBeforeInstallation: Um, don't know\n"; iInstaller->Release(); return 0; } -- 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
Re: [WiX-users] Windows Updates - either pending or running causes our installs to fail
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 #include #include #include 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 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
[WiX-users] Windows Updates - either pending or running causes our installs to fail
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