From f3ad21d0ed10f2294b7cc820d491129613c0ec4e Mon Sep 17 00:00:00 2001 From: Mikhail Date: Mon, 12 Aug 2024 16:04:56 -0400 Subject: [PATCH] Attempt to fix font install --- Rectify11.Phase2/Helper.cs | 15 ++++++++++++--- Rectify11.Phase2/Rectify11.Phase2.csproj | 1 - 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Rectify11.Phase2/Helper.cs b/Rectify11.Phase2/Helper.cs index 05828fcc8..952204f4f 100644 --- a/Rectify11.Phase2/Helper.cs +++ b/Rectify11.Phase2/Helper.cs @@ -1,6 +1,6 @@ -using Microsoft.VisualBasic; -using Microsoft.Win32; +using Microsoft.Win32; using System; +using System.Diagnostics; using System.Globalization; using System.IO; using static Rectify11.Phase2.Program; @@ -103,7 +103,16 @@ public static void ImportReg(string path) { try { - Interaction.Shell(Path.Combine(Variables.sys32Folder, "reg.exe") + " import " + path, AppWinStyle.Hide, true); + Process proc = new Process(); + proc.StartInfo.FileName = Path.Combine(Variables.sys32Folder, "reg.exe"); + proc.StartInfo.Arguments = "import \"" + path + "\""; + proc.StartInfo.CreateNoWindow = true; + proc.Start(); + + if (proc.ExitCode != 0) + { + Console.WriteLine(path + " failed with exit code " +proc.ExitCode); + } } catch (Exception ex) { diff --git a/Rectify11.Phase2/Rectify11.Phase2.csproj b/Rectify11.Phase2/Rectify11.Phase2.csproj index 40340b09f..9172ca437 100644 --- a/Rectify11.Phase2/Rectify11.Phase2.csproj +++ b/Rectify11.Phase2/Rectify11.Phase2.csproj @@ -43,7 +43,6 @@ -