GIS在哪里

 

读取注册表中的指定软件的路径

/// <summary>
/// 读取注册表中的制定软件的路径
/// </summary>
/// <param name="sKey"></param>
/// <returns></returns>
private string ReadRegistry(string sKey)
{
    //Open the subkey for reading
    Microsoft.Win32.RegistryKey rk = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(sKey, true);
    if (rk == null) return "";
    // Get the data from a specified item in the key.
    return (string)rk.GetValue("InstallDir");
}

调用方法

string sInstall = ReadRegistry("SOFTWARE\\ESRI\\CoreRuntime");

this.axSymbologyControl1.LoadStyleFile(sInstall + "http://www.cnblogs.com/hongzhi/admin/file://styles//ESRI.ServerStyle");

 

 

 

 

posted on 2010-08-20 15:10  寻找GIS  阅读(424)  评论(0编辑  收藏  举报

导航