File Explorer Automatic Folder Discovery - Disable
config/tweaks.json
1244 "WPFTweaksDisableExplorerAutoDiscovery": {
1245 "Content": "File Explorer Automatic Folder Discovery - Disable",
1246 "Description": "Windows Explorer automatically tries to guess the type of the folder based on its contents, slowing down the browsing experience. WARNING! Will disable File Explorer grouping.",
1247 "category": "Essential Tweaks",
1248 "panel": "1",
1249 "InvokeScript": [
1250 "
1251 # Previously detected folders
1252 $bags = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\"
1253
1254 # Folder types lookup table
1255 $bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\"
1256
1257 # Flush Explorer view database
1258 Remove-Item -Path $bags -Recurse -Force
1259 Write-Host \"Removed $bags\"
1260
1261 Remove-Item -Path $bagMRU -Recurse -Force
1262 Write-Host \"Removed $bagMRU\"
1263
1264 # Every folder
1265 $allFolders = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\\AllFolders\\Shell\"
1266
1267 if (!(Test-Path $allFolders)) {
1268 New-Item -Path $allFolders -Force
1269 Write-Host \"Created $allFolders\"
1270 }
1271
1272 # Generic view
1273 New-ItemProperty -Path $allFolders -Name \"FolderType\" -Value \"NotSpecified\" -PropertyType String -Force
1274 Write-Host \"Set FolderType to NotSpecified\"
1275
1276 Write-Host Please sign out and back in, or restart your computer to apply the changes!
1277 "
1278 ],
1279 "UndoScript": [
1280 "
1281 # Previously detected folders
1282 $bags = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\"
1283
1284 # Folder types lookup table
1285 $bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\"
1286
1287 # Flush Explorer view database
1288 Remove-Item -Path $bags -Recurse -Force
1289 Write-Host \"Removed $bags\"
1290
1291 Remove-Item -Path $bagMRU -Recurse -Force
1292 Write-Host \"Removed $bagMRU\"
1293
1294 Write-Host Please sign out and back in, or restart your computer to apply the changes!
1295 "
1296 ],