Windows Tools folder appears glitchy.


Anixx

Well-known member
Member
VIP
Local time
7:09 AM
Posts
663
OS
Windows 11
The Windows Tools folder appears glitchy in Win 11. The elements have wrong names and the icon size and view mode are not remembered on the folder close.
This happens always on any new installation, so it looks like a bug. Is there a workaround?

1771844584294.webp
The glitchy names appear only in the tile mode (not in small/medium/large icons, list or table) but the folder always opens in tile mode. If to set another view mode manually, it gets reset on the next folder opening.
 
Last edited:

My Computer

System One

  • OS
    Windows 11
Is there a workaround?
No.

Why it happens
Virtual Namespace: Windows Tools is a "Shell Namespace" folder designed to group disparate system utilities, Microsoft Store apps, and legacy executables.
Unique Identification: Because many modern apps (UWP/Store apps) do not have a traditional .exe path, Windows uses the Application User Model ID (AUMID) to identify and launch them.
Grouping Logic: The folder is often set by default to Group by > AppUserModelId to ensure these applications are correctly categorized for system functions like the taskbar and kiosk mode.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    ASUS ROG Strix
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
No.

Why it happens
Virtual Namespace: Windows Tools is a "Shell Namespace" folder designed to group disparate system utilities, Microsoft Store apps, and legacy executables.
Unique Identification: Because many modern apps (UWP/Store apps) do not have a traditional .exe path, Windows uses the Application User Model ID (AUMID) to identify and launch them.
Grouping Logic: The folder is often set by default to Group by > AppUserModelId to ensure these applications are correctly categorized for system functions like the taskbar and kiosk mode.
No, there is no groupping by default. Just tile mode and wrong names.
 

My Computer

System One

  • OS
    Windows 11
Just tile mode and wrong names.
Yeah..., probably the most glitchy folder in the entire OS! Not necessarily wrong names, just Class Identifiers.
Can't disable the mode or hide it!

12442.webp
 

My Computers

System One System Two

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    ASUS ROG Strix
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
Hmm, I have it differently:

1771856529530.webp

What program are you using for your view?
 

My Computer

System One

  • OS
    Windows 11
I an sure, the folder can be fixed with Windhawk.
Dunno, but, if StartAllBack can provide simple access, I'm sure Windhawk can do the same!

12444.webp
 

My Computers

System One System Two

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    ASUS ROG Strix
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
Although "Windows Tools" is shown as a path under "Control Panel" it contains a mix of items from various locations (as @Edwin noted). It's view is fixed to Tiles, but the names should appear correctly. This is how it looks on a unmodified build of Windows 11 25H2:

1771856861192.webp

Maybe the CLSID identifiers is a side-effect of using customization software.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
Dunno, but, if StartAllBack can provide simple access, I'm sure Windhawk can do the same!
I meant to fix the appearance of the folder in file manager.
 
Last edited:

My Computer

System One

  • OS
    Windows 11
I cannot get AppUserModeId as the column caption in the table mode. It is greyed out but checked. it is invisible in the table caption.

1771857627788.webp
 

My Computer

System One

  • OS
    Windows 11
Well, after selecting it in Groupping, I can see its column in the table.
1771857782123.webp
Once added, it cannot be removed.
 

My Computer

System One

  • OS
    Windows 11
I meant to fix the appearance of the folder in file manager.
Good luck. Personally, I have no need to visit that folder, that or the shell:appsfolder.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    ASUS ROG Strix
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
I've never used that folder either. I also use an unmodified version of 11 and mine looks exactly like @LesFerch. The interface of yours looks like something from the XP days. If I was guessing, and I am, your problem is a result of some 3rd party tool modification you have made.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2 26200.8655
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 7080
    CPU
    i9-10900 10 core 20 threads
    Motherboard
    DELL 0J37VM
    Memory
    32 gb
    Graphics Card(s)
    none-Intel UHD Graphics 630
    Sound Card
    Integrated Realtek
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    2x1tb Solidigm m.2 nvme /External drives 512gb Samsung m.2 sata+2tb Kingston m2.nvme
    PSU
    500w
    Case
    MT
    Cooling
    Dell Premium
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    so slow I'm too embarrassed to tell
    Browser
    #1 Edge #2 Firefox
    Antivirus
    Defender+MWB Premium
  • Operating System
    Windows 11 Pro 24H2 26200.8457
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink Mini PC SER5
    CPU
    AMD Ryzen 7 6800U
    Memory
    32 gb
    Graphics card(s)
    integrated
    Sound Card
    integrated
    Monitor(s) Displays
    Benq 27
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Crucial nvme
    Keyboard
    Logitech wired
    Mouse
    Logitech wireless
    Internet Speed
    still too embarrassed to tell
    Browser
    Firefox
    Antivirus
    Defender
    Other Info
    System 3 is non compliant Dell 9020 i7-4770/24gb ram Win11 PRO 26200.8457
Made a WH mod that makes this folder to remember the view mode like any other does.

Code:
// ==WindhawkMod==
// @id              fix-windows-tools-view
// @name            Fix Windows Tools Folder View
// @description     Saves/restores view mode for Windows Tools folder
// @version         1.0
// @author          Anixx
// @include         explorer.exe
// @compilerOptions -lole32 -luuid -lcomctl32
// ==/WindhawkMod==

#include <windows.h>
#include <commctrl.h>
#include <shlobj.h>
#include <shobjidl.h>
#include <exdisp.h>
#include <unordered_map>
#include <set>

static const CLSID CLSID_WindowsTools =
    {0x4234D49B, 0x0245, 0x4DF3,
     {0xB7, 0x80, 0x38, 0x93, 0x94, 0x34, 0x56, 0xE1}};

struct FolderInfo {
    int bagNumber = -1;
    IFolderView2* pFolderView = nullptr;
};

std::unordered_map<HWND, FolderInfo> g_windows;
std::set<HWND> g_subclassedDefViews;
HWND g_lastCreatedCabinet = NULL;

typedef HWND (WINAPI *CREATEWINDOWEXW)(DWORD, LPCWSTR, LPCWSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID);
typedef LONG (WINAPI *REGQUERYVALUEEXW)(HKEY, LPCWSTR, LPDWORD, LPDWORD, LPBYTE, LPDWORD);

CREATEWINDOWEXW pOriginalCreateWindowExW;
REGQUERYVALUEEXW pOriginalRegQueryValueExW;

LRESULT CALLBACK DefViewSubclassProc(HWND, UINT, WPARAM, LPARAM, UINT_PTR, DWORD_PTR);

int ExtractBagNumber(HKEY hKey) {
    typedef LONG (WINAPI *NTQUERYKEY)(HANDLE, int, PVOID, ULONG, PULONG);
    static NTQUERYKEY pNtQueryKey = (NTQUERYKEY)GetProcAddress(
        GetModuleHandleW(L"ntdll.dll"), "NtQueryKey");
    if (!pNtQueryKey) return -1;

    BYTE buffer[1024];
    ULONG resultLength;
    if (pNtQueryKey(hKey, 3, buffer, sizeof(buffer), &resultLength) != 0)
        return -1;

    WCHAR* keyPath = (WCHAR*)(buffer + sizeof(ULONG));
    const WCHAR* bags = wcsstr(keyPath, L"\\Bags\\");
    if (!bags) return -1;
    bags += 6;
    if (wcsstr(bags, L"AllFolders") == bags) return -1;

    return _wtoi(bags);
}

IFolderView2* GetFolderViewFromCabinet(HWND hwndCabinet) {
    IFolderView2* result = nullptr;
    IShellWindows* psw = nullptr;
    
    if (FAILED(CoCreateInstance(CLSID_ShellWindows, NULL, CLSCTX_LOCAL_SERVER,
                                 IID_IShellWindows, (void**)&psw)) || !psw) return nullptr;
    
    long count = 0;
    psw->get_Count(&count);
    
    for (long i = 0; i < count && !result; i++) {
        VARIANT vi = {VT_I4};
        vi.lVal = i;
        
        IDispatch* pdisp = nullptr;
        if (FAILED(psw->Item(vi, &pdisp)) || !pdisp) continue;
        
        IWebBrowser2* pwb = nullptr;
        if (SUCCEEDED(pdisp->QueryInterface(IID_IWebBrowser2, (void**)&pwb)) && pwb) {
            HWND hwnd = NULL;
            pwb->get_HWND((SHANDLE_PTR*)&hwnd);
            
            if (hwnd == hwndCabinet) {
                IServiceProvider* psp = nullptr;
                if (SUCCEEDED(pwb->QueryInterface(IID_IServiceProvider, (void**)&psp)) && psp) {
                    IShellBrowser* psb = nullptr;
                    if (SUCCEEDED(psp->QueryService(SID_STopLevelBrowser, IID_IShellBrowser, (void**)&psb)) && psb) {
                        IShellView* psv = nullptr;
                        if (SUCCEEDED(psb->QueryActiveShellView(&psv)) && psv) {
                            psv->QueryInterface(IID_IFolderView2, (void**)&result);
                            psv->Release();
                        }
                        psb->Release();
                    }
                    psp->Release();
                }
            }
            pwb->Release();
        }
        pdisp->Release();
    }
    psw->Release();
    return result;
}

bool IsWindowsToolsFolder(IFolderView2* pfv) {
    bool result = false;
    IPersistFolder2* ppf = nullptr;
    if (SUCCEEDED(pfv->GetFolder(IID_IPersistFolder2, (void**)&ppf)) && ppf) {
        CLSID clsid;
        if (SUCCEEDED(ppf->GetClassID(&clsid)))
            result = IsEqualCLSID(clsid, CLSID_WindowsTools);
        ppf->Release();
    }
    return result;
}

void SaveViewMode(IFolderView2* pfv, int bagNum) {
    UINT viewMode = 0;
    int iconSize = 0;
    if (FAILED(pfv->GetViewModeAndIconSize((FOLDERVIEWMODE*)&viewMode, &iconSize))) return;

    WCHAR regPath[256];
    wsprintfW(regPath, L"Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\\%d\\Shell", bagNum);

    HKEY hKey;
    if (RegCreateKeyExW(HKEY_CURRENT_USER, regPath, 0, NULL, 0, KEY_WRITE, NULL, &hKey, NULL) == ERROR_SUCCESS) {
        RegSetValueExW(hKey, L"WTViewMode", 0, REG_DWORD, (BYTE*)&viewMode, sizeof(viewMode));
        RegSetValueExW(hKey, L"WTIconSize", 0, REG_DWORD, (BYTE*)&iconSize, sizeof(iconSize));
        RegCloseKey(hKey);
    }
}

BOOL ApplyViewMode(IFolderView2* pfv, int bagNum) {
    WCHAR regPath[256];
    wsprintfW(regPath, L"Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\Shell\\Bags\\%d\\Shell", bagNum);

    HKEY hKey;
    if (RegOpenKeyExW(HKEY_CURRENT_USER, regPath, 0, KEY_READ, &hKey) != ERROR_SUCCESS)
        return FALSE;

    DWORD viewMode, iconSize, dataSize = sizeof(DWORD);
    BOOL result = FALSE;

    if (RegQueryValueExW(hKey, L"WTViewMode", NULL, NULL, (BYTE*)&viewMode, &dataSize) == ERROR_SUCCESS) {
        dataSize = sizeof(DWORD);
        if (RegQueryValueExW(hKey, L"WTIconSize", NULL, NULL, (BYTE*)&iconSize, &dataSize) == ERROR_SUCCESS)
            result = SUCCEEDED(pfv->SetViewModeAndIconSize((FOLDERVIEWMODE)viewMode, iconSize));
    }
    RegCloseKey(hKey);
    return result;
}

LRESULT CALLBACK DefViewSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam,
                                      LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData) {
    HWND hwndCabinet = GetAncestor(hWnd, GA_ROOT);
    
    if (uMsg == WM_SHOWWINDOW && wParam == TRUE) {
        IFolderView2* pfv = GetFolderViewFromCabinet(hwndCabinet);
        if (pfv) {
            if (IsWindowsToolsFolder(pfv)) {
                auto it = g_windows.find(hwndCabinet);
                if (it != g_windows.end()) {
                    it->second.pFolderView = pfv;
                    pfv->AddRef();
                    
                    if (it->second.bagNumber > 0 && !ApplyViewMode(pfv, it->second.bagNumber)) {
                        UINT viewMode = 0;
                        if (SUCCEEDED(pfv->GetCurrentViewMode(&viewMode)) && viewMode == FVM_TILE)
                            pfv->SetCurrentViewMode(FVM_LIST);
                    }
                }
            } else {
                pfv->Release();
                g_subclassedDefViews.erase(hWnd);
                RemoveWindowSubclass(hWnd, DefViewSubclassProc, uIdSubclass);
                return DefSubclassProc(hWnd, uMsg, wParam, lParam);
            }
            pfv->Release();
        }
    }
    else if (uMsg == WM_DESTROY) {
        auto it = g_windows.find(hwndCabinet);
        if (it != g_windows.end() && it->second.pFolderView && it->second.bagNumber > 0) {
            SaveViewMode(it->second.pFolderView, it->second.bagNumber);
            it->second.pFolderView->Release();
            it->second.pFolderView = nullptr;
        }
        g_subclassedDefViews.erase(hWnd);
        RemoveWindowSubclass(hWnd, DefViewSubclassProc, uIdSubclass);
    }

    return DefSubclassProc(hWnd, uMsg, wParam, lParam);
}

HWND WINAPI CreateWindowExWHook(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName,
                                 DWORD dwStyle, int X, int Y, int nWidth, int nHeight,
                                 HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam) {
    HWND hWnd = pOriginalCreateWindowExW(dwExStyle, lpClassName, lpWindowName, dwStyle,
                                          X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
    if (!hWnd || !lpClassName || ((ULONG_PTR)lpClassName <= 0xFFFF)) return hWnd;

    if (wcscmp(lpClassName, L"CabinetWClass") == 0) {
        g_lastCreatedCabinet = hWnd;
        g_windows[hWnd] = {};
    }
    else if (wcscmp(lpClassName, L"SHELLDLL_DefView") == 0) {
        SetWindowSubclass(hWnd, DefViewSubclassProc, 0, 0);
        g_subclassedDefViews.insert(hWnd);
    }

    return hWnd;
}

LONG WINAPI RegQueryValueExWHook(HKEY hKey, LPCWSTR lpValueName, LPDWORD lpReserved,
                                  LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData) {
    LONG result = pOriginalRegQueryValueExW(hKey, lpValueName, lpReserved, lpType, lpData, lpcbData);

    if (g_lastCreatedCabinet && IsWindow(g_lastCreatedCabinet)) {
        int bagNum = ExtractBagNumber(hKey);
        if (bagNum > 0) {
            auto it = g_windows.find(g_lastCreatedCabinet);
            if (it != g_windows.end() && it->second.bagNumber == -1)
                it->second.bagNumber = bagNum;
        }
    }
    return result;
}

BOOL Wh_ModInit(void) {
    Wh_SetFunctionHook((void*)GetProcAddress(LoadLibraryW(L"kernelbase.dll"), "RegQueryValueExW"),
                       (void*)RegQueryValueExWHook, (void**)&pOriginalRegQueryValueExW);
    Wh_SetFunctionHook((void*)CreateWindowExW,
                       (void*)CreateWindowExWHook, (void**)&pOriginalCreateWindowExW);
    return TRUE;
}

void Wh_ModUninit(void) {
    for (HWND hwnd : g_subclassedDefViews) {
        if (IsWindow(hwnd))
            RemoveWindowSubclass(hwnd, DefViewSubclassProc, 0);
    }
    g_subclassedDefViews.clear();
    
    for (auto& pair : g_windows) {
        if (pair.second.pFolderView)
            pair.second.pFolderView->Release();
    }
    g_windows.clear();
}
 

My Computer

System One

  • OS
    Windows 11

Latest Support Threads

Back
Top Bottom