以编程方式更改 Windows 特殊文件夹位置 [英] Change Windows special folders location programmatically

查看:33
本文介绍了以编程方式更改 Windows 特殊文件夹位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改 Windows 特殊文件夹的位置?(在 Win7 上,最好使用 C#).基本上是尝试做 Windows 界面允许我们做的事情,但是以编程方式.(见图)除了更改位置之外,它还应该移动任何现有内容.

How do I change the windows special folders location? (On Win7, Preferably using C#). Basically trying to do what the windows interface allows us to do, but programmatically. (See image) On top of changing the location it should also move any existing contents.

搜索了一下,显然 SHSetKnownFolderPath 不适用于 32 位应用程序(请参阅 末尾的评论)

Searched around a bit, Apparently SHSetKnownFolderPath does not work with 32 bit apps (see the comments at the end)

推荐答案

您希望更改注册表项.它们应该位于以下位置:

You're looking to change registry entries. They should be at the following spots:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

这篇关于以编程方式更改 Windows 特殊文件夹位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆