Last active
August 16, 2020 09:57
-
-
Save greatcodeeer/d2c41173e0e580adbbb4 to your computer and use it in GitHub Desktop.
C# 检测是否已经安装Winrar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static public bool ExistsWINRAR() | |
{ | |
try | |
{ | |
RegistryKey the_Reg = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Win11RAR.exe"); | |
return !string.IsNullOrEmpty(the_Reg.GetValue("").ToString()); | |
} | |
catch | |
{ | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment