From 90f5a1b5d748ea1ba6ed42cd90fb9cdc26a38e88 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 14 Mar 2020 19:38:47 -0500 Subject: [PATCH] Added extra launch parameter for DS4Updater Tell DS4Updater to attempt to autolaunch DS4W as normal user Related to issue #1113 --- DS4Windows/DS4Forms/MainWindow.xaml.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/DS4Windows/DS4Forms/MainWindow.xaml.cs b/DS4Windows/DS4Forms/MainWindow.xaml.cs index cf233e6..defeb6f 100644 --- a/DS4Windows/DS4Forms/MainWindow.xaml.cs +++ b/DS4Windows/DS4Forms/MainWindow.xaml.cs @@ -180,7 +180,14 @@ Properties.Resources.DS4Update, MessageBoxButton.YesNo, MessageBoxImage.Question using (Process p = new Process()) { p.StartInfo.FileName = System.IO.Path.Combine(Global.exedirpath, "DS4Updater.exe"); - p.StartInfo.Arguments = "-autolaunch"; + bool isAdmin = Global.IsAdministrator(); + List argList = new List(); + argList.Add("-autolaunch"); + if (!isAdmin) + { + argList.Add("-user"); + } + p.StartInfo.Arguments = string.Join(" ", argList); if (Global.AdminNeeded()) p.StartInfo.Verb = "runas";