@echo off
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    set params = %*:"=""
    echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
    "%temp%\getadmin.vbs"
    del "%temp%\getadmin.vbs"
    exit /B
:gotAdmin
    pushd "%CD%"
    CD /D "%~dp0"

del C:\Windows\System32\winsevr.dat
del C:\Windows\SysWOW64\winsevr.dat
for /F "tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{A83692F5-3E9B-4E95-9E7E-B5DF5536CE9D}_is1" /v InstallLocation') do set AMCORE=%%B
del "%AMCORE%AmCore.dll"
for /F "tokens=2*" %%A in ('reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A83692F5-3E9B-4E95-9E7E-B5DF5536CE9D}_is1" /v InstallLocation') do set AMCORE=%%B
del "%AMCORE%AmCore.dll"
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion /v ProgramData /f
reg delete HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion /v ProgramData /f