[wix-users] How to terminate an Update?

Stephen Downard stephen.downard at medfusion.com
Mon Jun 13 14:18:52 PDT 2016


There doesn't appear to be a way to evaluate IsCancled() within OnCacheAcquireProgress() and then return IDCANCEL, even if m_fCanceled is explicitly set to FALSE.
How can I prevent the engine from executing the new bundle?  Calling the following doesn't work, m_pEngine->Quit(1).  The active bundle does exit but the updated bundle passed into m_pEngine->SetUpdate() always executes.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Monday, June 13, 2016 3:57 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] How to terminate an Update?

Without access to the source it's hard to tell what your mods to WixStdBA may have done. Are your modifications posted someplace?

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Downard
Sent: Monday, June 13, 2016 1:36 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] How to terminate an Update?

nResult is 0 and only the final Else is evaluated.

nResult = __super::OnCacheAcquireProgress(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage);	
if (CBalBaseBootstrapperApplication::CheckCanceled())
	MessageBoxW(FindWindow(NULL, L" Setup"), L"CheckCanceled", L"OnCacheAcquireProgress", MB_OK); else if (CBalBaseBootstrapperApplication::m_fCanceled)
	MessageBoxW(FindWindow(NULL, L" Setup"), L"m_fCanceled", L"OnCacheAcquireProgress", MB_OK); else if (nResult == IDCANCEL)
	MessageBoxW(FindWindow(NULL, L" Setup"), L"nResult = cancel", L"OnCacheAcquireProgress", MB_OK); Else
	"no trip"
	

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Monday, June 13, 2016 1:50 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] How to terminate an Update?

What is it returning then?

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Downard
Sent: Monday, June 13, 2016 11:31 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] How to terminate an Update?

Yes, PromptCancel() is being called from OnClose().

 The call, __super::OnCacheAcquireProgress(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage) is not returning IDCANCEL when user cancels.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Monday, June 13, 2016 12:10 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] How to terminate an Update?

PromptCancel still being called from OnClose?

It sets m_fCanceled inside of the base BA. Don't look at fClose, use 

return __super::OnCacheAcquireProgress(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage);

Which will then call CheckCanceled.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Downard
Sent: Monday, June 13, 2016 11:06 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] How to terminate an Update?

Actually, I'm not using "embedded" WixStdBA UI.  I am loading the HyperLinkTheme UI, so "embedded" is evaluated as False.

if (BOOTSTRAPPER_DISPLAY_EMBEDDED == m_display) <-- is not True


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Downard
Sent: Monday, June 13, 2016 11:59 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] How to terminate an Update?

Yes, the display is embedded which is what you were referring too.


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Downard
Sent: Monday, June 13, 2016 11:51 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] How to terminate an Update?

I have modified WixStdBa.dll.  Within OnClose() a class member variable is set to fClose for cancel.  Then cancel is evaluated within OnCacheAcquireProgress and is never equal to True within this method, I don't know why.  The update is not embedded, it is downloaded.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Monday, June 13, 2016 11:06 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] How to terminate an Update?

Custom BA or?

I would assume this is because you are using a bundle with embedded payload, in which case I would expect OnCacheAcquireProgress to be called (where you could return IDCANCEL).

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Downard
Sent: Monday, June 13, 2016 9:53 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [wix-users] How to terminate an Update?

How can the engine be notified to terminate an update if end-user cancels while the update is being downloaded?  Currently, the engine will proceed to execute the updated Bundle.
I have tried setting m_pEngine->SetUpdate(NULL, NULL, 0, BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE, NULL, 0);

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list