Browse Source

增加获取 Downloads 路径的方法。

master^2
王厅 6 days ago
parent
commit
2b63fbf41e
  1. 9
      Apewer.Windows/WindowsUtility.cs

9
Apewer.Windows/WindowsUtility.cs

@ -963,6 +963,15 @@ namespace Apewer
#region 注册表。
/// <summary>获取当前用户 Downloads 目录的路径。</summary>
public static string GetDownloadsDirectory()
{
const string key = @"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders";
const string name = "{374DE290-123F-4565-9164-39C4925E467B}";
var value = RegistryHelper.GetString(RegistryHelper.CurrentUser, key, name);
return value;
}
/// <summary>获取用于记录卸载信息的注册表路径。</summary>
public static string[] GetUnInstallPath()
{

Loading…
Cancel
Save