Win 7 Change Folder View Options Script
Just thought I would share a script I developed to make changes to the default Folder View Options, Start Menu appearance and various other settings for ALL USERS in Win7. For the life of me I can't figure out why MS thought having those stupid check boxes by default was a great idea...
Anyway, here's the code:
edit: Updated with several changes and no longer have to run it in the startup folder, one time script ran during post-installation.
Anyway, here's the code:
dim strAllUsersDesktopPath, strUserProfilesDefaultFolder, strUserProfilesAdminFolder, strFileExt, strSharWiz, strCheckBox
dim objWshShell
Set objWshShell = WScript.CreateObject("WScript.Shell")
strAllUsersDesktopPath = objWshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Common Desktop")
' Attempts to configure Windows 2000/XP paths.
strUserProfilesDefaultFolder = Mid(strAllUsersDesktopPath,1,InStr(strAllUsersDesktopPath, "\All Users"))
If strUserProfilesDefaultFolder = "" Then
' Attempts to configure Windows Vista/7 paths.
strUserProfilesDefaultFolder = Mid(strAllUsersDesktopPath,1,InStr(strAllUsersDesktopPath, "\Public"))
End If
'Load the Default User profile registry hive
objWshShell.Run ("reg.exe load HKEY_USERS\CustomizeDefaultUserProfile """ & strUserProfilesDefaultFolder & "Default User\NTuser.dat"""), 0, True
'Set the registry key to turn off the Hidden File Extension folder option
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0","REG_DWORD"
'Set the registry key to turn off the Sharing Wizard folder option
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\SharingWizardOn", "0","REG_DWORD"
'Set the registry key to turn off Use Check Boxes to Select Items
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\AutoCheckSelect", "0","REG_DWORD"
'Set the registry key to remove Default Programs from the Start Menu
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowSetProgramAccessAndDefaults", "0","REG_DWORD"
'Set the registry key to Show Recent Documents in the Start Menu
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowRecentDocs", "1","REG_DWORD"
'Set the registry key to Hide My Music from the Start Menu
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowMyMusic", "0","REG_DWORD"
'Set the registry key to Hide My Games from the Start Menu
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowMyGames", "0","REG_DWORD"
'Set the registry key to Show Downloads on the Start Menu
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowDownloads", "0","REG_DWORD"
'Set the registry key to Hide My Pictures from the Start Menu
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowMyPics", "0","REG_DWORD"
'Set the Control Panel View to Small Icons
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\StartupPage", "1","REG_DWORD"
'Show My Computer on All User's Desktop
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "0","REG_DWORD"
'Show On Screen Keyboard on Right Side of Screen
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\TabletTip\1.7\EdgeTargetOnLeft", "0","REG_DWORD"
'Unload the Default User profile registry hive
objWshShell.Run ("reg.exe unload HKEY_USERS\CustomizeDefaultUserProfile"), 0, True
'Make Changes to the Installation (Administrator) Account
'Set the registry key to turn off the Hidden File Extension folder option
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0","REG_DWORD"
'Set the registry key to turn off the Hidden File Extension folder option
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0","REG_DWORD"
'Set the registry key to turn off the Sharing Wizard folder option
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\SharingWizardOn", "0","REG_DWORD"
'Set the registry key to turn off Use Check Boxes to Select Items
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\AutoCheckSelect", "0","REG_DWORD"
'Set the registry key to Show Downloads on the Start Menu
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowDownloads", "0","REG_DWORD"
'Set the registry key to Hide My Pictures from the Start Menu
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_ShowMyPics", "0","REG_DWORD"
'Set the Control Panel View to Small Icons
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\StartupPage", "2","REG_DWORD"
'Show My Computer on Desktop
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel\{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "0","REG_DWORD"
'Show On Screen Keyboard on Right Side of Screen
objWshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7\EdgeTargetOnLeft", "0","REG_DWORD"
edit: Updated with several changes and no longer have to run it in the startup folder, one time script ran during post-installation.
1 Comment
[ + ] Show comment
Answers (0)
Please log in to answer
Be the first to answer this question
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.
'All Items Icon view - at systemcontrollmgmt
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\AllItemsIconView", "1", "REG_DWORD"
objWshShell.RegWrite "HKEY_USERS\CustomizeDefaultUserProfile\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\StartupPage", "1", "REG_DWORD" - floppydev 10 years ago