@echo off
Setlocal && set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}" /s /v "VIDEO_NAME_SUFFIX""
for /F "tokens=2" %%G in ('%CIM%') do if "%%G" == "REG_SZ" goto :Beginning
cls && goto :End
:Beginning
cd /d %SystemDrive% && cls
Setlocal && if not exist %Windir%\System32\aticfx*.* goto :End
:Beginning
cd /d %SystemDrive% && cls
Setlocal && echo This Switcher Allows Users to Change their Perfomance Settings
echo as an attempt to improve Performance for Various
echo Games and other Software.
echo.
echo.
echo Support List For Games
echo ----------------------
echo Company of Heroes 2 Supports Switcher C for Legacy Users
echo Battlefield 4 Supports Switcher 2, A and B for Legacy Users
echo.
echo.
echo           Command List
echo ---------------------------------
echo [1] = Re-Installs All Switchers
echo [2] = iLegacy Default Performance
echo [A] = iLegacy Perf A Switcher
echo [B] = iLegacy Perf B Switcher
echo [C] = iLegacy Perf C Switcher
echo [D] = iLegacy Perf D Switcher
echo.
if "%CIM%" == "error" goto :Disp
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0000" /v "PerfSWInfo""
for /F "tokens=3*" %%G in ('%CIM%') do if %%G == Default goto :Cont
for /F "tokens=2*" %%G in ('%CIM%') do if %%G == REG_SZ goto :Cont1
cls
set "CIM=error" && goto :Beginning
:Disp
echo Currently in Use = iLegacy Default Performance && goto :Cont2

:Cont
for /F "tokens=3*" %%G in ('%CIM%') do echo Currently In Use = iLegacy %%G Performance && goto :Cont2

:Cont1
for /F "tokens=3*" %%G in ('%CIM%') do echo Currently In Use = iLegacy Perf %%G Switcher && goto :Cont2

:Cont2
set va1=error
set /p va1= Select An Option = %=%
echo.
if /i "%va1%" == "1" goto :OSCheck
if /i "%va1%" == "2" goto :OSCheck
if /i "%va1%" == "A" goto :OSCheck
if /i "%va1%" == "B" goto :OSCheck
if /i "%va1%" == "C" goto :OSCheck
if /i "%va1%" == "D" goto :OSCheck

:Return
cls
if not exist %Windir%\SysWOW64\AtBroker.exe goto :Beginning
if exist %Windir%\SysWOW64\AtBroker.exe goto :Beginning

:OSCheck
if not exist %Windir%\SysWOW64\AtBroker.exe goto :x32
if exist %Windir%\SysWOW64\AtBroker.exe goto :x64

:x64
cd /d %~dp0
if not exist %Windir%\SysWOW64\atidxxA1.dll goto :Install
if not exist %Windir%\SysWOW64\atidxxA2.dll goto :Install
if not exist %Windir%\SysWOW64\atidxxA3.dll goto :Install
if not exist %Windir%\SysWOW64\atidxxA4.dll goto :Install
if not exist %Windir%\SysWOW64\atidxxB1.dll goto :Install
if not exist %Windir%\SysWOW64\atidxxB2.dll goto :Install
if not exist %Windir%\SysWOW64\atidxxB3.dll goto :Install
if not exist %Windir%\SysWOW64\atidxxB4.dll goto :Install
if not exist %Windir%\SysWOW64\atiumdaA1.dll goto :Install
if not exist %Windir%\SysWOW64\atiumdaA2.dll goto :Install
if not exist %Windir%\SysWOW64\atiumdaA3.dll goto :Install
if /i "%va1%" == "1" goto :Install
if /i "%va1%" == "2" goto :ILPSWDF
if /i "%va1%" == "A" goto :ILEPSWA
if /i "%va1%" == "B" goto :ILEPSWB
if /i "%va1%" == "C" goto :ILEPSWC
if /i "%va1%" == "D" goto :ILEPSWD
:Install
echo Installing, Please Wait.
Timeout /T 3 >nul 2>&1
copy Switcher\SwitchB1\atidxxA1.dll %Windir%\SysWOW64 >nul 2>&1
copy Switcher\SwitchB1\atidxxA2.dll %Windir%\SysWOW64 >nul 2>&1
copy Switcher\SwitchB1\atidxxA3.dll %Windir%\SysWOW64 >nul 2>&1
copy Switcher\SwitchB1\atidxxA4.dll %Windir%\SysWOW64 >nul 2>&1
copy Switcher\SwitchB1\atidxxB1.dll %Windir%\SysWOW64 >nul 2>&1
copy Switcher\SwitchB1\atidxxB2.dll %Windir%\SysWOW64 >nul 2>&1
copy Switcher\SwitchB1\atidxxB3.dll %Windir%\SysWOW64 >nul 2>&1
copy Switcher\SwitchB1\atidxxB4.dll %Windir%\SysWOW64 >nul 2>&1
copy Switcher\SwitchB\atiumdaA1.dll %Windir%\SysWOW64 >nul 2>&1
copy Switcher\SwitchB\atiumdaA2.dll %Windir%\SysWOW64 >nul 2>&1
copy Switcher\SwitchB\atiumdaA3.dll %Windir%\SysWOW64 >nul 2>&1
copy Switcher\SwitchB\atiumdaA4.dll %Windir%\SysWOW64 >nul 2>&1
if /i "%va1%" == "2" goto :ILPSWDF
if /i "%va1%" == "A" goto :ILEPSWA
if /i "%va1%" == "B" goto :ILEPSWB
if /i "%va1%" == "C" goto :ILEPSWC
if /i "%va1%" == "D" goto :ILEPSWD
cd /d %ProgramFiles%\"ATI Technologies\ATI.ACE\Core-Static
if exist mom.exe goto :Start
if not exist mom.exe goto :Done


:ILPSWDF
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdagA.dll"\0"atiumdagA.dll"\0"atidxx32A.dll"\0"atidxx32A.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdag.dll"\0"atiumdag.dll"\0"atidxx32.dll"\0"atidxx32.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdagA.dll"\0"atiumdagA.dll"\0"atidxx32A.dll"\0"atidxx32A.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "Default" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdag.dll"\0"atiumdag.dll"\0"atidxx32.dll"\0"atidxx32.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "Default 100" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atiumdag.dll""
for /F "tokens=2" %%G in ('%CIM%') do (if /i "%%G" == "REG_MULTI_SZ" rename %Windir%\SysWOW64\Macromed\Flash\atiumd*.*dll atiumdag.dll >nul 2>&1)
cd /d %ProgramFiles%\"ATI Technologies\ATI.ACE\Core-Static
rundll32.exe user32.DLL,UpdatePerUserSystemParameters ,1 ,True
if exist mom.exe goto :Start
if not exist mom.exe goto :Done
:ILEPSWA
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA1.dll"\0"atiumdaA1.dll"\0"atidxxB1.dll"\0"atidxxB1.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA1.dll"\0"atiumdaA1.dll"\0"atidxxA1.dll"\0"atidxxA1.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA1.dll"\0"atiumdaA1.dll"\0"atidxxB1.dll"\0"atidxxB1.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "A" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA1.dll"\0"atiumdaA1.dll"\0"atidxxA1.dll"\0"atidxxA1.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "A 100" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atiumdaA1.dll""
for /F "tokens=2" %%G in ('%CIM%') do (if /i "%%G" == "REG_MULTI_SZ" rename %Windir%\SysWOW64\Macromed\Flash\atiumd*.*dll atiumdaA1.dll >nul 2>&1)
cd /d %ProgramFiles(x86)%\"ATI Technologies\ATI.ACE\Core-Static
rundll32.exe user32.DLL,UpdatePerUserSystemParameters ,1 ,True
if exist mom.exe goto :Start
if not exist mom.exe goto :Done
:ILEPSWB
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA2.dll"\0"atiumdaA2.dll"\0"atidxxB2.dll"\0"atidxxB2.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA2.dll"\0"atiumdaA2.dll"\0"atidxxA2.dll"\0"atidxxA2.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA2.dll"\0"atiumdaA2.dll"\0"atidxxB2.dll"\0"atidxxB2.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "B" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA2.dll"\0"atiumdaA2.dll"\0"atidxxA2.dll"\0"atidxxA2.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "B 100" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atiumdaA2.dll""
for /F "tokens=2" %%G in ('%CIM%') do (if /i "%%G" == "REG_MULTI_SZ" rename %Windir%\SysWOW64\Macromed\Flash\atiumd*.*dll atiumdaA2.dll >nul 2>&1)
cd /d %ProgramFiles(x86)%\"ATI Technologies\ATI.ACE\Core-Static
rundll32.exe user32.DLL,UpdatePerUserSystemParameters ,1 ,True
if exist mom.exe goto :Start
if not exist mom.exe goto :Done
:ILEPSWC
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA1.dll"\0"atiumdaA1.dll"\0"atidxxB3.dll"\0"atidxxB3.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA3.dll"\0"atiumdaA3.dll"\0"atidxxA3.dll"\0"atidxxA3.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA1.dll"\0"atiumdaA1.dll"\0"atidxxB3.dll"\0"atidxxB3.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "C" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA3.dll"\0"atiumdaA3.dll"\0"atidxxA3.dll"\0"atidxxA3.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "C 100" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atiumdaA3.dll""
for /F "tokens=2" %%G in ('%CIM%') do (if /i "%%G" == "REG_MULTI_SZ" rename %Windir%\SysWOW64\Macromed\Flash\atiumd*.*dll atiumdaA3.dll >nul 2>&1)
cd /d %ProgramFiles(x86)%\"ATI Technologies\ATI.ACE\Core-Static
rundll32.exe user32.DLL,UpdatePerUserSystemParameters ,1 ,True
if exist mom.exe goto :Start
if not exist mom.exe goto :Done
:ILEPSWD
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdagA.dll"\0"atiumdagA.dll"\0"atidxxB4.dll"\0"atidxxB4.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA4.dll"\0"atiumdaA4.dll"\0"atidxxA4.dll"\0"atidxxA4.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdagA.dll"\0"atiumdagA.dll"\0"atidxxB4.dll"\0"atidxxB4.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "D" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA4.dll"\0"atiumdaA4.dll"\0"atidxxA4.dll"\0"atidxxA4.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "D 100" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atiumdaA4.dll""
for /F "tokens=2" %%G in ('%CIM%') do (if /i "%%G" == "REG_MULTI_SZ" rename %Windir%\SysWOW64\Macromed\Flash\atiumd*.*dll atiumdaA4.dll >nul 2>&1)
cd /d %ProgramFiles%\"ATI Technologies\ATI.ACE\Core-Static
rundll32.exe user32.DLL,UpdatePerUserSystemParameters ,1 ,True
if exist mom.exe goto :Start 
if not exist mom.exe goto :Done
Exit

:x32
cd /d %~dp0
if not exist %Windir%\system32\atidxxA1.dll goto :Install
if not exist %Windir%\system32\atidxxA2.dll goto :Install
if not exist %Windir%\system32\atidxxA3.dll goto :Install
if not exist %Windir%\system32\atidxxA4.dll goto :Install
if not exist %Windir%\system32\atidxxB1.dll goto :Install
if not exist %Windir%\system32\atidxxB2.dll goto :Install
if not exist %Windir%\system32\atidxxB3.dll goto :Install
if not exist %Windir%\system32\atidxxB4.dll goto :Install
if not exist %Windir%\system32\atiumdaA1.dll goto :Install
if not exist %Windir%\system32\atiumdaA2.dll goto :Install
if not exist %Windir%\system32\atiumdaA3.dll goto :Install
if /i "%va1%" == "1" goto :Install
if /i "%va1%" == "2" goto :ILPSWDF
if /i "%va1%" == "A" goto :ILEPSWA
if /i "%va1%" == "B" goto :ILEPSWB
if /i "%va1%" == "C" goto :ILEPSWC
if /i "%va1%" == "D" goto :ILEPSWD
:Install
echo Installing, Please Wait.
Timeout /T 3 >nul 2>&1
copy Switcher\SwitchB1\atidxxA1.dll %Windir%\system32 >nul 2>&1
copy Switcher\SwitchB1\atidxxA2.dll %Windir%\system32 >nul 2>&1
copy Switcher\SwitchB1\atidxxA3.dll %Windir%\system32 >nul 2>&1
copy Switcher\SwitchB1\atidxxA4.dll %Windir%\system32 >nul 2>&1
copy Switcher\SwitchB1\atidxxB1.dll %Windir%\system32 >nul 2>&1
copy Switcher\SwitchB1\atidxxB2.dll %Windir%\system32 >nul 2>&1
copy Switcher\SwitchB1\atidxxB3.dll %Windir%\system32 >nul 2>&1
copy Switcher\SwitchB1\atidxxB4.dll %Windir%\system32 >nul 2>&1
copy Switcher\SwitchB\atiumdaA1.dll %Windir%\system32 >nul 2>&1
copy Switcher\SwitchB\atiumdaA2.dll %Windir%\system32 >nul 2>&1
copy Switcher\SwitchB\atiumdaA3.dll %Windir%\system32 >nul 2>&1
copy Switcher\SwitchB\atiumdaA4.dll %Windir%\system32 >nul 2>&1
if /i "%va1%" == "2" goto :ILPSWDF
if /i "%va1%" == "A" goto :ILEPSWA
if /i "%va1%" == "B" goto :ILEPSWB
if /i "%va1%" == "C" goto :ILEPSWC
if /i "%va1%" == "D" goto :ILEPSWD
cd /d %ProgramFiles%\"ATI Technologies\ATI.ACE\Core-Static
if exist mom.exe goto :Start
if not exist mom.exe goto :Done


:ILPSWDF
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdagA.dll"\0"atiumdagA.dll"\0"atidxx32A.dll"\0"atidxx32A.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdag.dll"\0"atiumdag.dll"\0"atidxx32.dll"\0"atidxx32.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdagA.dll"\0"atiumdagA.dll"\0"atidxx32A.dll"\0"atidxx32A.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "Default" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdag.dll"\0"atiumdag.dll"\0"atidxx32.dll"\0"atidxx32.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "Default" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atiumdag.dll""
for /F "tokens=2" %%G in ('%CIM%') do (if /i "%%G" == "REG_MULTI_SZ" rename %Windir%\system32\Macromed\Flash\atiumd*.*dll atiumdag.dll >nul 2>&1)
cd /d %ProgramFiles%\"ATI Technologies\ATI.ACE\Core-Static
rundll32.exe user32.DLL,UpdatePerUserSystemParameters ,1 ,True
if exist mom.exe goto :Start
if not exist mom.exe goto :Done
:ILEPSWA
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA1.dll"\0"atiumdaA1.dll"\0"atidxxB1.dll"\0"atidxxB1.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA1.dll"\0"atiumdaA1.dll"\0"atidxxA1.dll"\0"atidxxA1.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA1.dll"\0"atiumdaA1.dll"\0"atidxxB1.dll"\0"atidxxB1.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "A" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA1.dll"\0"atiumdaA1.dll"\0"atidxxA1.dll"\0"atidxxA1.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "A" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atiumdaA1.dll""
for /F "tokens=2" %%G in ('%CIM%') do (if /i "%%G" == "REG_MULTI_SZ" rename %Windir%\system32\Macromed\Flash\atiumd*.*dll atiumdaA1.dll >nul 2>&1)
cd /d %ProgramFiles(x86)%\"ATI Technologies\ATI.ACE\Core-Static
rundll32.exe user32.DLL,UpdatePerUserSystemParameters ,1 ,True
if exist mom.exe goto :Start
if not exist mom.exe goto :Done
:ILEPSWB
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA2.dll"\0"atiumdaA2.dll"\0"atidxxB2.dll"\0"atidxxB2.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA2.dll"\0"atiumdaA2.dll"\0"atidxxA2.dll"\0"atidxxA2.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA2.dll"\0"atiumdaA2.dll"\0"atidxxB2.dll"\0"atidxxB2.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "B" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA2.dll"\0"atiumdaA2.dll"\0"atidxxA2.dll"\0"atidxxA2.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "B" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atiumdaA2.dll""
for /F "tokens=2" %%G in ('%CIM%') do (if /i "%%G" == "REG_MULTI_SZ" rename %Windir%\system32\Macromed\Flash\atiumd*.*dll atiumdaA2.dll >nul 2>&1)
cd /d %ProgramFiles(x86)%\"ATI Technologies\ATI.ACE\Core-Static
rundll32.exe user32.DLL,UpdatePerUserSystemParameters ,1 ,True
if exist mom.exe goto :Start
if not exist mom.exe goto :Done
:ILEPSWC
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA1.dll"\0"atiumdaA1.dll"\0"atidxxB3.dll"\0"atidxxB3.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA3.dll"\0"atiumdaA3.dll"\0"atidxxA3.dll"\0"atidxxA3.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA1.dll"\0"atiumdaA1.dll"\0"atidxxB3.dll"\0"atidxxB3.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "C" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA3.dll"\0"atiumdaA3.dll"\0"atidxxA3.dll"\0"atidxxA3.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "C" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atiumdaA3.dll""
for /F "tokens=2" %%G in ('%CIM%') do (if /i "%%G" == "REG_MULTI_SZ" rename %Windir%\system32\Macromed\Flash\atiumd*.*dll atiumdaA3.dll >nul 2>&1)
cd /d %ProgramFiles(x86)%\"ATI Technologies\ATI.ACE\Core-Static
rundll32.exe user32.DLL,UpdatePerUserSystemParameters ,1 ,True
if exist mom.exe goto :Start
if not exist mom.exe goto :Done
:ILEPSWD
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdagA.dll"\0"atiumdagA.dll"\0"atidxxB4.dll"\0"atidxxB4.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Services\amdkmdag" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA4.dll"\0"atiumdaA4.dll"\0"atidxxA4.dll"\0"atidxxA4.dll" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxxA.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdagA.dll"\0"atiumdagA.dll"\0"atidxxB4.dll"\0"atidxxB4.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "D" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atioglxx.dll""
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /t REG_MULTI_SZ /v D3DVendorNameWoW /d "atiumdaA4.dll"\0"atiumdaA4.dll"\0"atidxxA4.dll"\0"atidxxA4.dll" /f >nul 2>&1)
for /F "tokens=* delims=:" %%G in ('%CIM%') do (reg add "%%G" /v PerfSWInfo /d "D" /f >nul 2>&1)
set "CIM=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class" /s /f "atiumdaA4.dll""
for /F "tokens=2" %%G in ('%CIM%') do (if /i "%%G" == "REG_MULTI_SZ" rename %Windir%\system32\Macromed\Flash\atiumd*.*dll atiumdaA4.dll >nul 2>&1)
cd /d %ProgramFiles%\"ATI Technologies\ATI.ACE\Core-Static
rundll32.exe user32.DLL,UpdatePerUserSystemParameters ,1 ,True
if exist mom.exe goto :Start 
if not exist mom.exe goto :Done

:Start
cls && goto :Beginning
exit

:End
cls
Echo Please Install a AMD/ATI Display Driver
Echo to continue using iLegacy Perf Switcher
timeout /T 5
exit

:Done
cls && goto :Beginning
exit