Skip to content

Commit 55c731a

Browse files
committed
Fix desktop launch
1 parent 60e9ef9 commit 55c731a

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

MigrationInstaller/Program.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ public static class Program
1616
private static string TempInstallerPath => Path.Combine(Path.GetTempPath(), "OpenShock_Desktop_Setup.exe");
1717

1818
private static readonly string LocalAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
19-
private static readonly string ExePath = Path.Combine(LocalAppData, "OpenShock", "Desktop", "OpenShock.Desktop.exe");
19+
private static readonly string DesktopProgramPath = Path.Combine(LocalAppData, "OpenShock", "Desktop");
20+
private static readonly string DesktopExePath = Path.Combine(DesktopProgramPath, "OpenShock.Desktop.exe");
2021

2122
public static async Task Main()
2223
{
@@ -107,10 +108,11 @@ private static async Task<bool> RunMainLogic()
107108
await RunProcess(TempInstallerPath, "/S");
108109
Console.WriteLine("✅ Update process complete.");
109110

110-
Console.WriteLine($"🔄 Relaunching OpenShock Desktop... ({ExePath})");
111+
Console.WriteLine($"🔄 Relaunching OpenShock Desktop... ({DesktopExePath})");
111112

112113
var proc = new Process();
113-
proc.StartInfo.FileName = ExePath;
114+
proc.StartInfo.WorkingDirectory = DesktopProgramPath;
115+
proc.StartInfo.FileName = DesktopExePath;
114116
proc.StartInfo.UseShellExecute = true;
115117
proc.Start();
116118

0 commit comments

Comments
 (0)