使用 PowerShell 禁用快速访问文件夹选项

huangapple go评论50阅读模式
英文:

Disable Quick Access Folder Options using PowerShell

问题

我想要编写一个 PowerShell 脚本来取消选中以下文件夹选项(文件夹选项 > 通用 > 隐私):

"在快速访问中显示最近使用的文件""在快速访问中显示频繁使用的文件夹"

我尝试查找这两个选项的注册表位置以便通过这种方式禁用它们,但是我没有找到需要更新的位置。我正在查看这个注册表位置:计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced

非常感谢您的任何建议。谢谢!

以下是我用来关闭这两个设置的脚本:

# 取消选中 "在快速访问中显示最近使用的文件" 和 "在快速访问中显示频繁使用的文件夹",适用于当前登录的操作系统帐户
$FolderOptionsPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer"
Set-ItemProperty -Path $FolderOptionsPath -Name ShowFrequent -Value '0'
Set-ItemProperty -Path $FolderOptionsPath -Name ShowRecent -Value '0'
英文:

I would like to put together a PowerShell script that will uncheck the following Folder Options (Folder Options > General > Privacy):
"Show recently used files in Quick access" & "Show frequently used folders in Quick access"

使用 PowerShell 禁用快速访问文件夹选项

I tried to find the registry locations for these two options so I could disable them that way, but I had no luck identifying the location that needed to be updated. I was reviewing this registry location: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced

Any input is greatly appreciated. Thanks!

Here is the script I used to turn off those two settings:

#Uncheck "Show recently used files in Quick access" & Uncheck "Show frequently used folders in Quick Access" for OS account currently logged in
$FolderOptionsPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer"
Set-ItemProperty -Path $FolderOptionsPath -Name ShowFrequent -Value '0'
Set-ItemProperty -Path $FolderOptionsPath -Name ShowRecent -Value '0'

答案1

得分: 2

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer

Value: ShowRecentShowFrequent

Data: 1 或 0

英文:

depending on all users or single user, follow proper tree
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer

Value: ShowRecent & ShowFrequent

Data: 1 or 0

huangapple
  • 本文由 发表于 2023年6月9日 03:57:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/76435309.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定