CLI tool for running Playbooks
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.0 KiB

1 year ago
6 months ago
6 months ago
1 year ago
6 months ago
1 year ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Microsoft.Win32;
  7. namespace TrustedUninstaller.Shared
  8. {
  9. public class Globals
  10. {
  11. public const string CurrentVersion = "0.7.4";
  12. public const double CurrentVersionNumber = 0.74;
  13. public static readonly int WinVer = Int32.Parse(Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion").GetValue("CurrentBuildNumber").ToString());
  14. private static int _winUpdateVer = -1;
  15. public static int WinUpdateVer
  16. {
  17. get
  18. {
  19. if (_winUpdateVer != -1)
  20. return _winUpdateVer;
  21. try
  22. {
  23. _winUpdateVer = (int)Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion").GetValue("UBR");
  24. }
  25. catch { _winUpdateVer = 0; }
  26. return _winUpdateVer;
  27. }
  28. }
  29. }
  30. }