Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
496 views
in Technique[技术] by (71.8m points)

registry - Configure Windows Explorer Folder Options through Powershell

I'm looking for a way to configure a few options in Folder Option dialog of Windows Explorer through Powershell.

The options are:

  • Choose "Show hidden files, folders, and drives"
  • Uncheck "Hide extensions for known file types"
  • Uncheck "Hide protected operating system files (Recommended)"
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Keith's answer didn't work for me out of the box. The only thing that took to the registry value modification was ShowSuperHidden. Both the Hidden (Show hidden files...) and HideFileExt (hide file extension) reverted back to their previous values as soon as I opened the View tab in Folder Settings.

Here's my solution, which I found after some trial and error (explorer.exe is automatically restarted):

$key = 'HKCU:SoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced'
Set-ItemProperty $key Hidden 1
Set-ItemProperty $key HideFileExt 0
Set-ItemProperty $key ShowSuperHidden 1
Stop-Process -processname explorer

I tested this on Windows Server 2008 R2 and Windows 7.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...