diff --git a/RFiDGear/3rdParty/RedCell/RedCell.Diagnostics.Update/Updater.cs b/RFiDGear/3rdParty/RedCell/RedCell.Diagnostics.Update/Updater.cs index 1783481..adaf22b 100644 --- a/RFiDGear/3rdParty/RedCell/RedCell.Diagnostics.Update/Updater.cs +++ b/RFiDGear/3rdParty/RedCell/RedCell.Diagnostics.Update/Updater.cs @@ -353,9 +353,13 @@ await Task.Run(() => var p = new Process(); var info = new ProcessStartInfo() { + /* FileName = "msiexec.exe", Verb="runas", - Arguments = string.Format("/i \"{0}\" ", Path.Combine(appDataPath, WorkPath, "Setup.msi")), + Arguments = string.Format("/i \"{0}\" ", Path.Combine(appDataPath, WorkPath, "RFiDGearBundleSetup.exe")), + */ + FileName = Path.Combine(appDataPath, WorkPath, "RFiDGearBundleSetup.exe"), + Verb = "runas", UseShellExecute = false }; diff --git a/RFiDGear/RFiDGear.csproj.user b/RFiDGear/RFiDGear.csproj.user index 9f835dd..13c5b32 100644 --- a/RFiDGear/RFiDGear.csproj.user +++ b/RFiDGear/RFiDGear.csproj.user @@ -16,7 +16,7 @@ D:\CardCheck_data - REPORTTARGETPATH="D:\CardCheck_data\KP-000005-5_final.pdf" CUSTOMPROJECTFILE="D:\CardCheck_data\KPruefung_Vorlagen\00_RFID_Gear_Vorlage\CardCheck_OhneSchreibvorgang_Deutsch_DESFire-Classic-Unbekannt_01_mitEXIT.rfPrj" %24JOBNUMBER="KP-000005" %24CHIPNUMBER="5" AUTORUN=1 + REPORTTARGETPATH="D:\CardCheck_data\KP-000222\KP-000222-3_final.pdf" REPORTTEMPLATEFILE="D:\CardCheck_data\KP-000222\KP-000222-3_.pdf" CUSTOMPROJECTFILE="D:\CardCheck_data\KPruefung_Vorlagen\00_RFID_Gear_Vorlage\CardCheckAssistant_FreeMemDesfireOnly.rfPrj" %24JOBNUMBER="KP-000222" %24CHIPNUMBER="3" AUTORUN=1 REPORTTARGETPATH="D:\CardCheck_data\KP-000005-5_final.pdf" REPORTTEMPLATEFILE="D:\CardCheck_data\KP-000005-5_.pdf" CUSTOMPROJECTFILE="D:\CardCheck_data\KPruefung_Vorlagen\00_RFID_Gear_Vorlage\CardCheckAssistant_FreeMem.rfPrj" %24JOBNUMBER="KP-000005" %24CHIPNUMBER="5" AUTORUN=1 diff --git a/RFiDGear/ViewModel/MainWindowViewModel.cs b/RFiDGear/ViewModel/MainWindowViewModel.cs index 9fe7124..079270a 100644 --- a/RFiDGear/ViewModel/MainWindowViewModel.cs +++ b/RFiDGear/ViewModel/MainWindowViewModel.cs @@ -2384,6 +2384,8 @@ private void CloseThreads(object sender, CancelEventArgs e) private async void LoadCompleted(object sender, EventArgs e) { + var autorun = false; + Application.Current.MainWindow.Activated -= new EventHandler(LoadCompleted); mw = (MainWindow)Application.Current.MainWindow; @@ -2392,7 +2394,6 @@ private async void LoadCompleted(object sender, EventArgs e) checkUpdate = new Timer(CheckUpdate, null, 100, 5000); // ! UI-Thread ! checkReader = new Timer(CheckReader, null, 5000, 3000); // ! UI-Thread ! var projectFileToUse = ""; - await InitOnFirstRun(projectFileToUse); using (var settings = new SettingsReaderWriter()) { @@ -2456,8 +2457,7 @@ private async void LoadCompleted(object sender, EventArgs e) case "AUTORUN": if (arg.Split('=')[1] == "1") { - await OnNewReadChipCommand(); - await OnNewWriteToChipOnceCommand(); + autorun = true; } break; @@ -2486,7 +2486,15 @@ private async void LoadCompleted(object sender, EventArgs e) } } } - } + } + + await InitOnFirstRun(projectFileToUse); + + if (autorun) + { + await OnNewReadChipCommand(); + await OnNewWriteToChipOnceCommand(); + } } private async Task InitOnFirstRun(string projectFileToUse) @@ -2534,7 +2542,6 @@ private async Task InitOnFirstRun(string projectFileToUse) { await OpenLastProjectFile(projectFileToUse); } - } Task.Run(async () => diff --git a/RFiDGearBundleSetup/Bundle.wxs b/RFiDGearBundleSetup/Bundle.wxs index eefe582..ddafe3d 100644 --- a/RFiDGearBundleSetup/Bundle.wxs +++ b/RFiDGearBundleSetup/Bundle.wxs @@ -126,7 +126,7 @@ --> - +