I need help. I see this error message whenever I click start menu icon:
Long story short, I am a Windows 10 tinkerer and installed 600+ programs and made numerous tweaks to my Windows 10 operating system, and some recent hacks had broke my Windows 10 installation, namely Start menu not working properly and unable to install Windows Updates, I have tried repair install numerous times but inexplicably the repair install always fails and automatically reverts, and I can't pickup anything useful from eventvwr.msc.
I have tried this script numerous times:
IF ((Get-FileHash -Path D:\ISO\Win10_20H2_v2_English_x64.iso).hash -eq "6C6856405DBC7674EDA21BC5F7094F5A18AF5C9BACC67ED111E8F53F02E7D13D") { $Letter=(Get-DiskImage -ImagePath D:\ISO\Win10_20H2_v2_English_x64.iso | Get-Volume).DriveLetter IF (!$Letter) {Mount-DiskImage -ImagePath D:\ISO\Win10_20H2_v2_English_x64.iso -StorageType ISO} $Letter=(Get-DiskImage -ImagePath D:\ISO\Win10_20H2_v2_English_x64.iso | Get-Volume).DriveLetter dism /online /cleanup-image /startcomponentcleanup /resetbase dism /online /cleanup-image /spsuperseded dism /online /cleanup-image /restorehealth /source:${Letter}:\sources\install.wim:6 /limitaccess sfc /scannow
}And the result is always "The restore operation completed successfully", "Windows Resource Protection did not find any integrity violations." -- but the issues were never fixed.
So I decided to do a clean install, but first I want to check which programs don't need to be reinstalled, I don't want to reinstall all those 600+ programs again, so I want to know which programs will run properly if I just copy the installation folder from "C:\Program Files", "C:\Program Files (x86)" and C:\ProgramData without running the installer and which programs must be reinstalled.
So I ran this script:
xcopy D:\Links D:\NLinks /s
$shell = New-Object -ComObject Wscript.Shell
$links = (Get-ChildItem -Path D:\NLinks -File -Force -Recurse -Filter "*.lnk").FullName
foreach ($link in $links) { $lnk=$shell.CreateShortcut($link) if ($lnk.TargetPath -match "C:\\") { $lnk.TargetPath = $lnk.TargetPath.replace('C:\','E:\') if ($lnk.Arguments -match "C:\\") { $lnk.Arguments = $lnk.Arguments.replace('C:\','E:\') } if ($lnk.IconLocation -match "C:\\") { $lnk.IconLocation = $lnk.IconLocation.replace('C:\','E:\') } if ($lnk.WorkingDirectory -match "C:\\") { $lnk.WorkingDirectory = $lnk.WorkingDirectory.replace('C:\','E:\') } $lnk.Save() }
}And found most programs don't require reinstallation, but some do.
However this is where the new problem started: I have many drives, I have 1 1000GB Samsung 870 QVO SSD and 3 Seagate HDDs, two BarraCudas, one 500GB and one 1000GB, and 1 4000GB Exos 7E8, currently I use the SSD as the main OS drive and installed Windows 10 20H2 to it, I have installed different OSes to all four disks, and I am currently using the spare Windows 10 20H2 installed on the 500GB HDD.
I have found out many programs created folders inside C:\ProgramData folder, and I suspect the files there might be needed to start the programs, so I have done something stupid, I copied the ProgramData folder to the root of the spare Windows installation directory, using fastcopy, what makes it stupid? I have explicitly chosen to "Copy (Overwrite)", and immediately after that Start menu malfunctions.
I have tried dism and sfc of course, but that didn't help, I now realize that the files inside C:\Windows must be intact, but some system files inside C:\ProgramData was corrupted and these files weren't fixed by sfc, and these corrupted files have overwritten the good files inside the spare Windows installation.
I tried safe mode and it didn't help.
I found this PowerShell command:
Get-appxpackage -all *shellexperience* -packagetype bundle |% {add-appxpackage -register -disabledevelopmentmode ($_.installlocation + "\appxmetadata\appxbundlemanifest.xml")}But it doesn't even do anything.
Then I fixed the code and ran it:
Get-appxpackage -all *shellexperience* |% {add-appxpackage -register -disabledevelopmentmode "$($_.installlocation)\AppxManifest.xml"}
Get-appxpackage -all *startmenuexperiencehost* |% {add-appxpackage -register -disabledevelopmentmode "$($_.installlocation)\AppxManifest.xml"}The ShellExperienceHost is reinstalled but it doesn't fix anything.
I can also tell you ShellExperienceHost and StartMenuExperienceHost aren't running.
I tried WSReset and it errored out.
So how can I fix this spare Windows installation without repair install? Can a repair install even do it?
01 Answer
Nevermind, I had just solved it again, I ran the following commands:
Get-appxpackage -all *startmenuexperiencehost* |% {add-appxpackage -register -disabledevelopmentmode "$($_.installlocation)\AppxManifest.xml"}
wsresetAnd the problem is gone.
I just realized Start Menu is started by Microsoft.Windows.StartMenuExperienceHost so I should reregister Microsoft.Windows.StartMenuExperienceHost instead of Microsoft.Windows.ShellExperienceHost.
I have confirmed running
Get-appxpackage -all *shellexperience* |% {add-appxpackage -register -disabledevelopmentmode "$($_.installlocation)\AppxManifest.xml"}doesn't fix this problem.
So much help from Google and Microsoft, they kept giving wrong answers...
1