SightstoneOfficial / LegendaryClient

LegendaryClient, rebooted
68 stars 59 forks source link

Import game location from registry #27

Closed naeem76 closed 10 years ago

naeem76 commented 10 years ago
  LogTextBox("Checking for existing League of Legends Installation");
                GameLocation = Path.Combine("League of Legends", "RADS");
                string rootPath = Microsoft.Win32.Registry.GetValue(
                    @"HKEY_LOCAL_MACHINE\Software\Riot Games\League Of Legends",
                    "Path", 
                    "")
                    .ToString();
                if (Directory.Exists(GameLocation))
                {
                    RetrieveCurrentInstallation = true;
                }
                else if (Directory.Exists(Path.Combine(rootPath,"RADS")))
                {
                    RetrieveCurrentInstallation = true;
                    GameLocation = Path.Combine(rootPath,"RADS");
                }
                else
                {
                    LogTextBox("Unable to find existing League of Legends. Copy your League of Legends folder into + "
                        + Client.ExecutingDirectory
                        + " to make the patching process quicker");
                }
naeem76 commented 10 years ago

Slight error in code Line 15

GameLocation = Path.Combine(rootPath,"RADS"));

eddy5641 commented 10 years ago

integrated