2016/05/24

C#.Net Get LINE installed path

最快方法就是直接找機碼啦XD
using Microsoft.Win32;
using System;

namespace CYFang
{
    class Line
    {
        private const string key = @"SOFTWARE\WOW6432Node\LINE Corporation\LINE\";

        public static String GetPath()
        {
            RegistryKey localMachine = Registry.LocalMachine;
            return localMachine.OpenSubKey(key).GetValue("RunOnce", "").ToString();
        }
    }
}

執行結果:

沒有留言:

張貼留言