Files
winutil/docs/content/dev/tweaks/Essential-Tweaks/DisableExplorerAutoDiscovery.md
Sean (ANGRYxScotsman) 9b03b94435 more winutil website update and new features (#4030)
* updated theme to the latest version

* Update en.yaml

* removed all the order from the docs

* add the store link

* update homepage

* add filename and line number to all the code blocks and also removed pages

* auto pull the code from the json files

* Merge branch 'main' into winutil-new-features

* the script updated linenostart=

* Delete LaptopHibernation.md
2026-02-12 14:33:11 -06:00

2.1 KiB

title, description
title description
Disable Explorer Automatic Folder Discovery
  "WPFTweaksDisableExplorerAutoDiscovery": {
    "Content": "Disable Explorer Automatic Folder Discovery",
    "Description": "Windows Explorer automatically tries to guess the type of the folder based on its contents, slowing down the browsing experience.",
    "category": "Essential Tweaks",
    "panel": "1",
    "InvokeScript": [
      "
      # Previously detected folders
      $bags = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\"

      # Folder types lookup table
      $bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\"

      # Flush Explorer view database
      Remove-Item -Path $bags -Recurse -Force
      Write-Host \"Removed $bags\"

      Remove-Item -Path $bagMRU -Recurse -Force
      Write-Host \"Removed $bagMRU\"

      # Every folder
      $allFolders = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\\AllFolders\\Shell\"

      if (!(Test-Path $allFolders)) {
        New-Item -Path $allFolders -Force
        Write-Host \"Created $allFolders\"
      }

      # Generic view
      New-ItemProperty -Path $allFolders -Name \"FolderType\" -Value \"NotSpecified\" -PropertyType String -Force
      Write-Host \"Set FolderType to NotSpecified\"

      Write-Host Please sign out and back in, or restart your computer to apply the changes!
      "
    ],
    "UndoScript": [
      "
      # Previously detected folders
      $bags = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\"

      # Folder types lookup table
      $bagMRU = \"HKCU:\\Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\BagMRU\"

      # Flush Explorer view database
      Remove-Item -Path $bags -Recurse -Force
      Write-Host \"Removed $bags\"

      Remove-Item -Path $bagMRU -Recurse -Force
      Write-Host \"Removed $bagMRU\"

      Write-Host Please sign out and back in, or restart your computer to apply the changes!
      "
    ],