diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-02-22 20:23:43 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-02-22 23:37:57 -0600 |
commit | 8e8f724d90c6835febb8b5865009746aea73a334 (patch) | |
tree | b255c0a7232af8d24bcf44fd476b95bdfdcfe777 /src/test/burn/WixTestTools/BundleInstaller.cs | |
parent | 0740d93ca8be06ec0e5da5b51ceff52f67ab5bf5 (diff) | |
download | wix-8e8f724d90c6835febb8b5865009746aea73a334.tar.gz wix-8e8f724d90c6835febb8b5865009746aea73a334.tar.bz2 wix-8e8f724d90c6835febb8b5865009746aea73a334.zip |
Add UnsafeUninstall action.
Fixes #6721
Diffstat (limited to 'src/test/burn/WixTestTools/BundleInstaller.cs')
-rw-r--r-- | src/test/burn/WixTestTools/BundleInstaller.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/test/burn/WixTestTools/BundleInstaller.cs b/src/test/burn/WixTestTools/BundleInstaller.cs index a49c4024..2b449ebf 100644 --- a/src/test/burn/WixTestTools/BundleInstaller.cs +++ b/src/test/burn/WixTestTools/BundleInstaller.cs | |||
@@ -3,6 +3,7 @@ | |||
3 | namespace WixTestTools | 3 | namespace WixTestTools |
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Collections.Generic; | ||
6 | using System.IO; | 7 | using System.IO; |
7 | using System.Text; | 8 | using System.Text; |
8 | 9 | ||
@@ -131,6 +132,35 @@ namespace WixTestTools | |||
131 | } | 132 | } |
132 | 133 | ||
133 | /// <summary> | 134 | /// <summary> |
135 | /// Uninstalls the bundle unsafely with optional arguments. | ||
136 | /// </summary> | ||
137 | /// <param name="expectedExitCode">Expected exit code, defaults to success.</param> | ||
138 | /// <param name="arguments">Optional arguments to pass to the tool.</param> | ||
139 | /// <returns>Path to the generated log file.</returns> | ||
140 | public string UnsafeUninstall(int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) | ||
141 | { | ||
142 | var newArgumentList = new List<string>(); | ||
143 | newArgumentList.Add("-unsafeuninstall"); | ||
144 | newArgumentList.AddRange(arguments); | ||
145 | return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Custom, newArgumentList.ToArray()); | ||
146 | } | ||
147 | |||
148 | /// <summary> | ||
149 | /// Uninstalls the bundle unsafely at the given path with optional arguments. | ||
150 | /// </summary> | ||
151 | /// <param name="bundlePath">This should be the bundle in the package cache.</param> | ||
152 | /// <param name="expectedExitCode">Expected exit code, defaults to success.</param> | ||
153 | /// <param name="arguments">Optional arguments to pass to the tool.</param> | ||
154 | /// <returns>Path to the generated log file.</returns> | ||
155 | public string UnsafeUninstall(string bundlePath, int expectedExitCode = (int)MSIExec.MSIExecReturnCode.SUCCESS, params string[] arguments) | ||
156 | { | ||
157 | var newArgumentList = new List<string>(); | ||
158 | newArgumentList.Add("-unsafeuninstall"); | ||
159 | newArgumentList.AddRange(arguments); | ||
160 | return this.RunBundleWithArguments(expectedExitCode, MSIExec.MSIExecMode.Custom, newArgumentList.ToArray(), bundlePath: bundlePath); | ||
161 | } | ||
162 | |||
163 | /// <summary> | ||
134 | /// Executes the bundle with optional arguments. | 164 | /// Executes the bundle with optional arguments. |
135 | /// </summary> | 165 | /// </summary> |
136 | /// <param name="expectedExitCode">Expected exit code.</param> | 166 | /// <param name="expectedExitCode">Expected exit code.</param> |