打开Windows 7库中的Windows资源管理器资源管理器、库中、Windows

2023-09-03 01:33:49 作者:占尽风情

我如何打开Windows 7库像文件图片音乐视频和我的应用程序的所有其他自定义库?

How do I open a Windows 7 Library like Documents, Pictures, Music, Videos and all other custom libraries from my app?

我试图打开的Explorer.exe库\文件,但它不工作。

I tried opening explorer.exe Libraries\Documents but it doesn't work.

推荐答案

查找AppData目录:

Find the AppData directory:

Dim appData As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)

查找文件快捷方式,然后在资源管理器中打开它:

Find the documents shortcut and open it in explorer:

For Each file As String In Directory.GetFiles(appData, "Documents.library-ms", SearchOption.AllDirectories)
    Process.Start(file)
Next