aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Util/ca
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2026-08-01 22:55:27 -0400
committerBob Arnson <bob@firegiant.com>2026-08-09 22:55:24 -0400
commit7db9a9436d8734d050582afdb3a2dfda21c606e1 (patch)
tree651332dc9e84faee4c026883215f83d78dac63da /src/ext/Util/ca
parentccfda4f4a158b19f61b018b944eb86272f427f55 (diff)
downloadwix-bob/CancelWhenDeferred.tar.gz
wix-bob/CancelWhenDeferred.tar.bz2
wix-bob/CancelWhenDeferred.zip
Add CancelWhenDeferred, like FailWhenDeferred.bob/CancelWhenDeferred
Useful for integration testing packages.
Diffstat (limited to '')
-rw-r--r--src/ext/Util/ca/test.cpp15
-rw-r--r--src/ext/Util/ca/utilca.def1
2 files changed, 16 insertions, 0 deletions
diff --git a/src/ext/Util/ca/test.cpp b/src/ext/Util/ca/test.cpp
index e9d02ed3..8f1c238b 100644
--- a/src/ext/Util/ca/test.cpp
+++ b/src/ext/Util/ca/test.cpp
@@ -40,6 +40,21 @@ static LRESULT CALLBACK WndProc(
40 40
41 41
42/****************************************************************** 42/******************************************************************
43WixCancelWhenDeferred - entry point for WixCancelWhenDeferred
44 custom action which always cancels when running as a deferred
45 custom action (otherwise it blindly succeeds). It's useful when
46 testing the rollback of deferred custom actions: Schedule it
47 immediately after the rollback/deferred CA pair you're testing
48 and it will fail, causing your rollback CA to get invoked.
49********************************************************************/
50extern "C" UINT __stdcall WixCancelWhenDeferred(
51 __in MSIHANDLE hInstall
52)
53{
54 return ::MsiGetMode(hInstall, MSIRUNMODE_SCHEDULED) ? ERROR_INSTALL_USEREXIT : ERROR_SUCCESS;
55}
56
57/******************************************************************
43WixFailWhenDeferred - entry point for WixFailWhenDeferred 58WixFailWhenDeferred - entry point for WixFailWhenDeferred
44 custom action which always fails when running as a deferred 59 custom action which always fails when running as a deferred
45 custom action (otherwise it blindly succeeds). It's useful when 60 custom action (otherwise it blindly succeeds). It's useful when
diff --git a/src/ext/Util/ca/utilca.def b/src/ext/Util/ca/utilca.def
index 2aeb54f4..f525233d 100644
--- a/src/ext/Util/ca/utilca.def
+++ b/src/ext/Util/ca/utilca.def
@@ -82,6 +82,7 @@ EXPORTS
82 WixShellExecBinary 82 WixShellExecBinary
83 WixUnelevatedShellExec 83 WixUnelevatedShellExec
84; test.cpp 84; test.cpp
85 WixCancelWhenDeferred
85 WixFailWhenDeferred 86 WixFailWhenDeferred
86 WixWaitForEvent 87 WixWaitForEvent
87; TouchFile.cpp 88; TouchFile.cpp