/// <summary> /// Determines whether the game is installed. /// </summary> /// <returns><c>true</c> if the game is installed; otherwise, <c>false</c>.</returns> public bool IsGameInstalled() { //Criteria for considering the game 'installed' //Does the game directory exist? bool bHasDirectory = Directory.Exists(Config.GetGamePath(true)); //Is there an .install file in the directory? bool bHasInstallationCookie = File.Exists(ConfigHandler.GetInstallCookiePath()); //is there a version file? bool bHasGameVersion = File.Exists(Config.GetGameVersionPath()); //If any of these criteria are false, the game is not considered fully installed. return(bHasDirectory && bHasInstallationCookie && IsInstallCookieEmpty() && bHasGameVersion); }