Skip to content

Commit 20b6627

Browse files
HedreonWumboSpasm
authored andcommitted
Add start menu shortcut in correct places
1 parent be6c37e commit 20b6627

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

FlashpointInstaller/src/Forms/Operate.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,14 @@ await Task.Run(() =>
252252
}
253253
if (FPM.Main.ShortcutStartMenu.Checked)
254254
{
255-
shortcutPaths.Add(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu));
255+
if (Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.Programs)))
256+
{
257+
shortcutPaths.Add(Environment.GetFolderPath(Environment.SpecialFolder.Programs));
258+
}
259+
else
260+
{
261+
shortcutPaths.Add(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu));
262+
}
256263
}
257264

258265
foreach (string path in shortcutPaths)
@@ -319,4 +326,4 @@ private void Operation_FormClosing(object sender, FormClosingEventArgs e)
319326
FPM.Client.DownloadProgressChanged -= OnDownloadProgressChanged;
320327
}
321328
}
322-
}
329+
}

0 commit comments

Comments
 (0)