diff --git a/SPTarkov.Server/Program.cs b/SPTarkov.Server/Program.cs index 4b1bc28d..9ac13704 100644 --- a/SPTarkov.Server/Program.cs +++ b/SPTarkov.Server/Program.cs @@ -18,6 +18,14 @@ public static class Program { public static async Task Main(string[] args) { + // Some users don't know how to create a shortcut... + if (!IsRunFromInstallationFolder()) + { + Console.WriteLine("You have not created a shortcut properly. Please hold alt when dragging to create a shortcut."); + await Task.Delay(-1); + return; + } + // Initialize the program variables ProgramStatics.Initialize(); @@ -156,6 +164,14 @@ public static class Program } } + private static bool IsRunFromInstallationFolder() + { + var dirFiles = Directory.GetFiles(Directory.GetCurrentDirectory()); + + // This file is guaranteed to exist if ran from the correct location, even if the game does not exist here. + return dirFiles.Any(dirFile => dirFile.EndsWith("sptLogger.json")); + } + [DllImport("kernel32.dll", SetLastError = true)] private static extern IntPtr GetStdHandle(int nStdHandle);