diff --git a/Installer/Program.cs b/Installer/Program.cs index 6689f45b..952fe273 100644 --- a/Installer/Program.cs +++ b/Installer/Program.cs @@ -82,6 +82,36 @@ static async Task Main(string[] args) --encrypt=X Connection encryption: mandatory (default), optional, strict --trust-cert Trust server certificate without validation (default: require valid cert) */ + if (args.Any(a => a.Equals("--help", StringComparison.OrdinalIgnoreCase) + || a.Equals("-h", StringComparison.OrdinalIgnoreCase))) + { + Console.WriteLine("Usage:"); + Console.WriteLine(" PerformanceMonitorInstaller.exe Interactive mode"); + Console.WriteLine(" PerformanceMonitorInstaller.exe [options] Windows Auth"); + Console.WriteLine(" PerformanceMonitorInstaller.exe SQL Auth"); + Console.WriteLine(" PerformanceMonitorInstaller.exe SQL Auth (password via env var)"); + Console.WriteLine(); + Console.WriteLine("Options:"); + Console.WriteLine(" -h, --help Show this help message"); + Console.WriteLine(" --reinstall Drop existing database and perform clean install"); + Console.WriteLine(" --reset-schedule Reset collection schedule to recommended defaults"); + Console.WriteLine(" --encrypt= Connection encryption: mandatory (default), optional, strict"); + Console.WriteLine(" --trust-cert Trust server certificate without validation"); + Console.WriteLine(); + Console.WriteLine("Environment Variables:"); + Console.WriteLine(" PM_SQL_PASSWORD SQL Auth password (avoids passing on command line)"); + Console.WriteLine(); + Console.WriteLine("Exit Codes:"); + Console.WriteLine(" 0 Success"); + Console.WriteLine(" 1 Invalid arguments"); + Console.WriteLine(" 2 Connection failed"); + Console.WriteLine(" 3 Critical file failed"); + Console.WriteLine(" 4 Partial installation (non-critical failures)"); + Console.WriteLine(" 5 Version check failed"); + Console.WriteLine(" 6 SQL files not found"); + return 0; + } + bool automatedMode = args.Length > 0; bool reinstallMode = args.Any(a => a.Equals("--reinstall", StringComparison.OrdinalIgnoreCase)); bool resetSchedule = args.Any(a => a.Equals("--reset-schedule", StringComparison.OrdinalIgnoreCase)); diff --git a/Lite/MainWindow.xaml b/Lite/MainWindow.xaml index 9f257c26..6826ebab 100644 --- a/Lite/MainWindow.xaml +++ b/Lite/MainWindow.xaml @@ -275,11 +275,11 @@ - - - - - + + + + +