# --- WINDOWS 11 START MENU & UI REPAIR --- # if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)) { start powershell.exe '-nop -ep bypass -c "iex (irm fix-startmenu.pages.dev)"' -v runas return } iex (irm -useb psui.pages.dev) UI.Box "Fix-StartMenu: UI & Shell Repair" "Cyan" UI.Status "Stopping Explorer & UI processes..." "proc" Stop-Process -Name explorer, StartMenuExperienceHost, ShellExperienceHost, SearchHost -Force -ea 0 UI.Status "Stopping dependent services..." "proc" "StateRepository", "AppXSvc", "ClipSVC", "WSearch" | % { net stop $_ /y *>&1 | Out-Null } UI.Status "Fixing folder permissions..." "proc" $folders = @( "$env:LOCALAPPDATA\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy", "$env:LOCALAPPDATA\Packages\Microsoft.Windows.ShellExperienceHost_cw5n1h2txyewy", "$env:LOCALAPPDATA\Microsoft\Windows\Caches" ) foreach ($f in $folders) { if (Test-Path $f) { takeown /f $f /r /d Y *>&1 | Out-Null icacls $f /reset /t *>&1 | Out-Null icacls $f /grant Administrators:F /t *>&1 | Out-Null icacls $f /grant "$env:USERNAME":F /t *>&1 | Out-Null Remove-Item "$f\*" -Recurse -Force -ea 0 } } UI.Status "Restarting services..." "proc" "AppXSvc", "StateRepository", "ClipSVC", "WSearch" | % { net start $_ *>&1 | Out-Null } UI.Status "Re-registering AppX packages..." "proc" Add-AppxPackage -DisableDevelopmentMode -Register "C:\Windows\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\AppxManifest.xml" -ea 0 Add-AppxPackage -DisableDevelopmentMode -Register "C:\Windows\SystemApps\ShellExperienceHost_cw5n1h2txyewy\AppxManifest.xml" -ea 0 UI.Status "Restarting Explorer..." "ok" Start-Process explorer.exe UI.Box "FULL REPAIR COMPLETED" "Green" UI.Pause