added powershell script to set explorer view mode globally for logged on user
This commit is contained in:
parent
6ed2a610ec
commit
8d51d7a491
@ -101,13 +101,6 @@ echo ##### USER TWEAKS
|
||||
echo #####
|
||||
echo.
|
||||
|
||||
echo setting RECYCLE BIN limits ...
|
||||
powershell -command %TOOLS%\set-recyclebin.ps1
|
||||
|
||||
echo Enabling the show file extensions feature in explorer ...
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" ^
|
||||
/v "HideFileExt" /t REG_DWORD /d 0 /f 1>nul
|
||||
|
||||
echo Adding "This PC" icon for current user on desktop Windows 10 ...
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" ^
|
||||
/v "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" /t REG_DWORD /d 0 /f 1>nul
|
||||
@ -121,6 +114,20 @@ echo Adding seconds to clock ...
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" ^
|
||||
/v "ShowSecondsInSystemClock" /t REG_DWORD /d 1 /f 1>nul
|
||||
|
||||
echo setting RECYCLE BIN limits ...
|
||||
powershell -command %TOOLS%\set-recyclebin.ps1
|
||||
|
||||
echo setting GLOBAL view mode for windows EXPLORER ...
|
||||
powershell -command %TOOLS%\set-exlorer-viewmode.ps1
|
||||
|
||||
echo Enabling the show file extensions feature in explorer ...
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" ^
|
||||
/v "HideFileExt" /t REG_DWORD /d 0 /f 1>nul
|
||||
|
||||
echo Do not add "-Shortcut" text to the name of newly created shortcuts ...
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer" ^
|
||||
/v "link" /t REG_BINARY /d "00000000" /f 1>nul
|
||||
|
||||
echo Disabling search box on taskbar ...
|
||||
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search" ^
|
||||
/v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f 1>nul
|
||||
|
34
tools/set-exlorer-viewmode.ps1
Normal file
34
tools/set-exlorer-viewmode.ps1
Normal file
@ -0,0 +1,34 @@
|
||||
# set all explorer views for THIS logged on user globally to a special mode ...
|
||||
# Use: 1 = Details, 2 = Tiles, 3 = Icons, 4 = List, 5 = Content
|
||||
|
||||
$ViewMode=1
|
||||
|
||||
# Paths for PowerShell commands use the registry Get-PSDrives, hence the ':'
|
||||
$src = 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes'
|
||||
$dst = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes'
|
||||
$topViews = "$dst\*\TopViews\*"
|
||||
|
||||
# Paths for reg.exe commands do not use a ':'
|
||||
$bagMRU = 'HKCR\Local Settings\Software\Microsoft\Windows\Shell\BagMRU'
|
||||
$bags = 'HKCR\Local Settings\Software\Microsoft\Windows\Shell\Bags'
|
||||
$defaults = 'HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults'
|
||||
|
||||
# Delete saved views and 'Apply to folders' defaults
|
||||
reg delete $bagMRU /f 2>&1 | Out-Null
|
||||
reg delete $bags /f 2>&1 | Out-Null
|
||||
reg delete $defaults /f 2>&1 | Out-Null
|
||||
reg delete ($dst.Replace(':','')) /f 2>&1 | Out-Null
|
||||
|
||||
# First, we copy HKLM\...\FolderTypes to HKCU\...\FolderTypes
|
||||
Copy-Item $src "$(Split-Path $dst)" -Recurse
|
||||
|
||||
# Set all 'LogicalViewMode' values to the desired style
|
||||
Get-ChildItem $topViews | % {
|
||||
$key2edit = (get-item $_.PSParentPath).OpenSubKey($_.PSChildName, $True);
|
||||
$key2edit.SetValue('LogicalViewMode', $ViewMode)
|
||||
$key2edit.Close()
|
||||
}
|
||||
|
||||
# restart explorer ...
|
||||
Get-Process Explorer | Stop-Process
|
||||
|
Loading…
Reference in New Issue
Block a user