Skip to content

Commit 0396070

Browse files
committed
Attempting to set results message
1 parent add78b4 commit 0396070

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

ReadableExpressions.Visualizers.Installer.Custom/VisualizerInstallationActions.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public class VisualizerInstallationActions
1919
private static readonly Lazy<string> _vsixManifestLoader;
2020

2121
private static Session _session;
22+
private static string _resultMessage;
2223

2324
static VisualizerInstallationActions()
2425
{
@@ -78,7 +79,7 @@ public static ActionResult Install(Session session)
7879
installed.Add("Visual Studio " + visualizer.VsFullVersionNumber);
7980
}
8081

81-
session["WIXUI_EXITDIALOGOPTIONALTEXT"] = string.Join(Environment.NewLine, installed);
82+
_resultMessage = string.Join(Environment.NewLine, installed);
8283

8384
Log("Complete");
8485

@@ -113,6 +114,13 @@ public static ActionResult Uninstall(Session session)
113114
return ActionResult.Success;
114115
}
115116

117+
[CustomAction]
118+
public static ActionResult SetResultMessage(Session session)
119+
{
120+
session["WIXUI_EXITDIALOGOPTIONALTEXT"] = _resultMessage;
121+
return ActionResult.Success;
122+
}
123+
116124
private static IEnumerable<Visualizer> GetRelevantVisualizers()
117125
{
118126
using (var registryData = new RegistryData(_thisAssemblyVersion))

ReadableExpressions.Visualizers.Installer/Product.wxs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<Custom Action="VisualizersUninstall" Before="InstallFinalize">
2323
(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
2424
</Custom>
25+
26+
<Custom Action="SetResultMessage" After="InstallFinalize" />
2527
</InstallExecuteSequence>
2628
</Product>
2729

@@ -50,5 +52,8 @@
5052

5153
<CustomAction Id="VisualizersUninstall" BinaryKey="VisualizersBinary"
5254
DllEntry="Uninstall" Impersonate="no" Execute="deferred" Return="check"/>
55+
56+
<CustomAction Id="SetResultMessage" BinaryKey="VisualizersBinary"
57+
DllEntry="SetResultMessage" Impersonate="no" Execute="immediate" Return="ignore"/>
5358
</Fragment>
5459
</Wix>

0 commit comments

Comments
 (0)