using Microsoft.Win32;

public bool findSoftwareInstalled()
        {
            try
            {
                RegistryKey regkey = Registry.LocalMachine.OpenSubKey("SOFTWARE", true).OpenSubKey(@"Microsoft", true).OpenSubKey(@"Office", true).OpenSubKey(@"Word");
                if (regkey == null)
                {
                    return false;
                }
                else
                {
                    return true;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message.ToString());
                return false;
            }
        }

 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 winnercow 的頭像
    winnercow

    大智若愚,努力中

    winnercow 發表在 痞客邦 留言(0) 人氣()