HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Windows/diagnostics/system/WindowsMediaPlayerConfiguration/RS_ConfigurationErrors.ps1
# Copyright � 2008, Microsoft Corporation. All rights reserved.


#RS_ConfigurationErrors

$result = Get-DiagInput -id IT_ResetConfiguration

if ($result[0] -eq "Yes")
{
    $ConfigEntryPath = "HKCU:\Software\Microsoft\MediaPlayer\Preferences"

    $IsExist = Test-Path "HKCU:\Software\Microsoft\MediaPlayer\Preferences.old"

    if($IsExist -eq $true)
    {
        Remove-Item -path "HKCU:\Software\Microsoft\MediaPlayer\Preferences.old" -Recurse -Force
    }

    Rename-Item $ConfigEntryPath -NewName "Preferences.old"

    New-Item -path $ConfigEntryPath

    copy-itemproperty -path HKCU:\Software\Microsoft\MediaPlayer\Preferences.old -destination $ConfigEntryPath -name AcceptedPrivacyStatement
}