예제 #1
0
 protected override string findInstallPath()
 {
     Registry.RegistryHandler reg = new Registry.RegistryHandler("local_machine", @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ScummVM_is1", false);
     if (reg.key_found && reg.hasValue("InstallLocation") &&
         File.Exists(Path.Combine(reg.getValue("InstallLocation"), "scummvm.exe"))) {
         return reg.getValue("InstallLocation");
     } else {
         string file_path = Path.Combine("ScummVM", "scummvm.exe");
         if (File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), file_path))) {
             return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "ScummVM");
         } else if (File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), file_path))) {
             return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "ScummVM");
         }
     }
     return null;
 }
예제 #2
0
 protected override string findInstallPath()
 {
     Registry.RegistryHandler reg = new Registry.RegistryHandler("local_machine", @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ScummVM_is1", false);
     if (reg.key_found && reg.hasValue("InstallLocation") &&
         File.Exists(Path.Combine(reg.getValue("InstallLocation"), "scummvm.exe")))
     {
         return(reg.getValue("InstallLocation"));
     }
     else
     {
         string file_path = Path.Combine("ScummVM", "scummvm.exe");
         if (File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), file_path)))
         {
             return(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "ScummVM"));
         }
         else if (File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), file_path)))
         {
             return(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "ScummVM"));
         }
     }
     return(null);
 }