From fb7511e8844d35ec947b03e08e7c1b28d448780b Mon Sep 17 00:00:00 2001 From: KoalaBear Date: Fri, 3 Dec 2021 15:10:15 +0100 Subject: [PATCH] - Show version in Installer --- src/HAClimateDeskbandInstaller/Program.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/HAClimateDeskbandInstaller/Program.cs b/src/HAClimateDeskbandInstaller/Program.cs index c96646a..73c33ad 100644 --- a/src/HAClimateDeskbandInstaller/Program.cs +++ b/src/HAClimateDeskbandInstaller/Program.cs @@ -14,6 +14,8 @@ class Program private const string DllName = "HAClimateDeskband.dll"; static Guid UninstallGuid = new Guid(@"2d0e746f-e2ae-4c2c-9040-5c5a715e7a8a"); + public static Version Version { get; private set; } + class InstallInfo { public List FilesToCopy { get; set; } @@ -23,7 +25,11 @@ class InstallInfo static void Main(string[] args) { - Console.Title = "HA Climate Deskband Installer"; + Version = typeof(Program).Assembly.GetName().Version; + + string message = $"HA Climate Deskband {Version} Installer"; + Console.Title = message; + Console.WriteLine(message); InstallInfo info = new InstallInfo { @@ -60,7 +66,7 @@ public static void WriteEmbeddedResourceToFile(string resourceName, string fileN static void Install(InstallInfo info) { - Console.WriteLine("Installing HA Climate Deskband on your computer, please wait."); + Console.WriteLine($"Installing HA Climate Deskband {Version} on your computer, please wait."); RestartExplorer restartExplorer = new RestartExplorer(); try