Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. using Microsoft.Win32;
  2.  
  3. namespace FooBar
  4. {
  5. public static class HaloSettings
  6. {
  7. public const string HaloRegistryKey = @"HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft Games\Halo";
  8.  
  9. public static string HaloExeDir
  10. {
  11. get
  12. {
  13. return (Registry.GetValue(HaloRegistryKey, "EXE Path", ".") ?? ".").ToString();
  14. }
  15. }
  16.  
  17. public static string HaloExePath
  18. {
  19. get { return HaloExeDir + @"\halo.exe"; }
  20. }
  21.  
  22. public static string HaloVersion
  23. {
  24. get
  25. {
  26. return (Registry.GetValue(HaloRegistryKey, "Version", "0") ?? "0").ToString();
  27. }
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement