读注册表

public static string GetPath()
{
string sPath;
RegistryKey lRk_Path;
lRk_Path = Registry.CurrentUser;

//打开software目录
RegistryKey software = lRk_Path.OpenSubKey("Software");
RegistryKey odbc = software.OpenSubKey("ODBC");
RegistryKey odbcini = odbc.OpenSubKey("ODBC.INI");
RegistryKey Xsc = odbcini.OpenSubKey("Xsc");
sPath = Xsc.GetValue ("Path").ToString ();
return sPath;

}

posted on 2004-10-14 16:31  LEE  阅读(359)  评论(0编辑  收藏  举报

导航