现在的位置: 首页 > 综合 > 正文

根据注册表判断是否已经安装了WINRAR

2019年10月10日 ⁄ 综合 ⁄ 共 237字 ⁄ 字号 评论关闭
staticpublic 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
    {
        returnfalse;
    }
}

抱歉!评论已关闭.