0

..And I think I know why. Early on, I bought into the "Windows 10 is spyware!!" meme and ran some random tool that apparently damaged various parts of my system.

I'm now trying to get those damaged bits back, starting with Cortana.

Clicking on the taskbar search icon and clicking on the gear brings me to a screen that says "Cortana is disabled by company policy". Some reading digs up a few things that would lead to the feature being disabled, but I've checked them all:

  • A group policy administrative template that disables Cortana. This is set as "not configured".

  • A registry hack, under HKLM/SOFTWARE/Policies/Microsoft/Windows/Windows Search that would place an AllowCortana = 0 key. No such key exists.

  • Having the incorrect language files installed. All I have is English, and I am in the USA and on the English locale.

  • Having telemetry turned off - I'm in the insider program, so it's set to Full for me.

For giggles, I did a sfc /scannow, and of course, nothing was found.

How do I undo whatever damage this tool did to my system, and get Cortana back?

2
  • 2
    Time for a "Reset"...? Apr 8 '16 at 2:13
  • That's definitely not off the table, but given my past bad luck with resets, I'd much rather do something a bit more targeted if at all possible.
    – Karu
    Apr 8 '16 at 2:13
0
  1. Make sure you don't have any exchange accounts set up with Outlook.
  2. Run this powershell script.

Done.

# Needs to run as administrator
If ( -not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
    $arguments = "& '" + $myinvocation.mycommand.definition + "'"
        Start-Process powershell -Verb runAs -ArgumentList $arguments
        Break
}

# Installs cortana (and friends)

Get-AppXPackage -AllUsers | ForEach { Add-AppXPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml" }

# Set registry keys properly
# taken from `http://stackoverflow.com/a/5652674/850326`
Function Test-RegistryValue {
    param(
        [Alias("PSPath")]
        [Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
        [String]$Path
        ,
        [Parameter(Position = 1, Mandatory = $true)]
        [String]$Name
        ,
        [Switch]$PassThru
    )

    process {
        if (Test-Path $Path) {
            $Key = Get-Item -LiteralPath $Path
            if ($Key.GetValue($Name, $null) -ne $null) {
                if ($PassThru) {
                    Get-ItemProperty $Path $Name
                } else {
                    $true
                }
            } else {
                $false
            }
        } else {
            $false
        }
    }
}

Function Set-RegistryValue {
    param(
        [Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
        [String]$Path
        ,
        [Parameter(Position = 1, Mandatory = $true)]
        [String]$Name
        ,
        [Parameter(Position = 2, Mandatory = $true)]
        [String]$Value
    )

    If (-not (Test-Path $Path))
    {
        New-Item -Path "$Path" -Force | Out-Null

    }

    if (-not (Test-RegistryValue -Path "$Path" -Name "$Name"))
    {
        New-ItemProperty -Path "$Path" -Name "$Name" -Value "$Value"
    }
    else
    {
        Set-ItemProperty -Path "$Path" -Name "$Name" -Value "$Value"
    }
}

# Fix allow cortana key

$allowCortanaPath = "Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Windows Search"
$allowCortanaName = "AllowCortana"
$allowCortanaValue = "1"

Set-RegistryValue -Path "$allowCortanaPath" -Name "$allowCortanaName" -Value "$allowCortanaValue"

# Fix allow telemetry key

$allowTelemetryPath = "Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DataCollection"
$allowTelemetryName = "AllowTelemetry"
# The following value sets "AllowTelemetry" to "Full"
$allowTelemetryValue = "3"

Set-RegistryValue -Path "$allowTelemetryPath" -Name "$allowTelemetryName" -Value "$allowTelemetryValue"

# Restart explorer to see changes

Stop-Process -name explorer
6
  • You would understand if you read the question. The key "AllowCortana" under the registry path "HKEY_LOCAL_MACHINE/SOFTWARE/Policies/Microsoft/Windows/Windows Search" is referred to in the question. Set it to 1 using regedit. Aug 4 '16 at 22:03
  • Edited the script to make it work better Aug 4 '16 at 22:36
  • @fixer1234 Maybe that would be more useful? Aug 4 '16 at 22:40
  • It doesn't work! Aug 4 '16 at 23:25
  • 1
    @AmirHossein Nowhere in the question does the OP menton DWS_Lite.
    – DavidPostill
    Aug 7 '16 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.