using Microsoft
namespace SystemPathsApp
{
/// <summary>
/// Summary description for SystemPaths
/// </summary>
public class SystemPaths
{
public SystemPaths()
{
//
// TODO: Add constructor logic here
//
folders = OpenRegistryPath(Registry
}
private RegistryKey folders;
private RegistryKey OpenRegistryPath(RegistryKey root
{
s = s
while (s
{
root = root
s = s
}
return root;
}
/// <summary>
/// </summary>
/// <param name=
/// Desktop 桌面目錄
/// Fonts 字體目錄
/// NetHood 網上鄰居
/// Personal 我的文檔目錄
/// Programs 開始菜單程序目錄
/// Recent 存放用戶最近訪問文件快捷方式的目錄
/// SendTo 發送到目錄
/// StartMenu 開始菜單目錄
/// Startup 開始菜單啟動項目錄
/// Favorites 收藏夾目錄
/// History 網頁歷史目錄
/// Cookies cookies目錄
/// Cache 緩存目錄
/// AppData 應用程序數據目錄
/// PrintHood 打印目錄
/// </param>
/// <returns></returns>
public string Customize(string path)
{
return folders
}
public string Desktop()
{
return Customize(
}
public string Cookies()
{
return Customize(
}
public string MyDocuments()
{
return Customize(
}
public string History()
{
return Customize(
}
public string Favorites()
{
return Customize(
}
}
}
From:http://tw.wingwit.com/Article/program/net/201311/12147.html