retesere20

---- gpedit-msc-c# ---

Oct 11th, 2018
101
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private static void Main(string[] args)
  2. {
  3. RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\Windows NT\\CurrentVersion");
  4. registryKey.GetValue("EditionID");
  5. if (registryKey.Equals("BusinessBasic") || registryKey.Equals("BusinessPremium") || registryKey.Equals("Ultimate"))
  6. {
  7. MessageBox.Show("Your version of Windows Vista already has gpedit.msc.");
  8. Environment.Exit(0);
  9. }
  10. if (Directory.Exists("C:\\Program Files (x86)"))
  11. {
  12. ProcessStartInfo processStartInfo = new ProcessStartInfo();
  13. processStartInfo.FileName = "x64.bat";
  14. Process process = new Process();
  15. process.StartInfo = processStartInfo;
  16. process.Start();
  17. }
  18. else if (!Directory.Exists("C:\\Program Files (x86)"))
  19. {
  20. ProcessStartInfo processStartInfo = new ProcessStartInfo();
  21. processStartInfo.FileName = "x86.bat";
  22. Process process = new Process();
  23. process.StartInfo = processStartInfo;
  24. process.Start();
  25. }
  26. }
RAW Paste Data