пятница, 8 января 2016 г.

Critical Error – Start menu and Cortana aren’t working


At the middle of December of 2015 I got a message informing me that Cortana and Start Menu of my Windows 10 stopped working.
The message looked like as follows:
So, after a couple of minutes I found a solution but I have to apply it in a several steps.
1. The commandlet sequence must be executed with elevated rights.
2. The following script doesn't run as expected on my machine:
Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
And a simple solution turned into sofisticated one.
Unfortunately I don't remember all the errors occured during scripts execution, but the thing is... a variable $_.InstallLocation was undefined.
So I rewrote script as follows:
   $manifest=(Get-AppxPackage Microsoft.WindowsStore).InstallLocation + '\AppxManifest.xml'
   Get-AppXPackage -AllUsers | Foreach {
      Add-AppxPackage -DisableDevelopmentMode -Register $manifest
   }
Finally it worked. So I restarted my computer and noticed that Start Menu is working. I almost forgot about this error 'til a day before yesterday: it happened again! I just gather all the commands in one script and placed it on the desktop. So if one might found it useful, here is the link for archive with it: https://www.dropbox.com/s/o3wo9uvefgo69ys/FixCortana.7z?dl=0