Endlocal
:Beginning
@echo off
cd /d %SystemDrive% >nul 2>&1
del /f "%SystemDrive%\Programdata\Clean\*.txt" /q /a
cls && rmdir /q "%SystemDrive%\Programdata\Clean" /s >nul 2>&1
Taskkill /IM "Ping.exe" /IM "rundll32.exe" /IM Msiexec.exe /F /T >nul 2>&1
cls && echo The Driver Cleaner and Package Cleaner are now integrated into ONE Shortcut
echo so Users can easily gain access to both Cleaners. This Newly added shortcut
echo is also capable of displaying both Driver and Software Packages. 
echo.
echo Note:
echo For Optimal Removal of Drivers and Software, users are required to uninstall
echo the Display Driver First then proceed to using the Software Uninstaller.
echo.
echo ID#   Package Identification Name                              Current Status
echo -----------------------------------------------------------------------------
echo [1] = Allows Users to Access the Driver Uninstaller              Selection
echo [2] = Allows Users to Access the Sofware Uninstaller             Selection
echo [3] = Allows Users to Access the AMD GPU Restarter               Selection
set "CIM=reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\Installer" /s /v "DisplayName""
for /F "delims=" %%G in ('findstr /i /M "8.930" %Windir%\Inf\oem*.inf') do if exist %%G set "inst1=1"
if "%inst1%" == "1" echo [?] = Signature Workaround                                       Installed && goto :Con1
if "%inst1%" == "2" echo [?] = Signature Workaround                                     Not Installed && goto :Con1
:Con1
for /F "delims=" %%G in ('findstr /i /M "updbu" %Windir%\Inf\oem*.inf') do if exist %%G set "inst2=1"
if "%inst2%" == "1" echo [?] = Upgradeable Build (Upgrades any Drivers)                   Installed && goto :Con2
if "%inst2%" == "2" echo [?] = Upgradeable Build (Upgrades any Drivers)                 Not Installed && goto :Con2
:Con2
for /F "delims=" %%G in ('findstr /i /M "atikm" %Windir%\Inf\oem*.inf') do if exist %%G set "inst3=1"
for /F "delims=" %%G in ('findstr /i /M "a.t.i.k.m" %Windir%\Inf\oem*.inf') do if exist %%G set "inst3=1"
if "%inst3%" == "1" echo [?] = AMD Display Driver (AMD Display Drivers)                   Installed && goto :Con3
if "%inst3%" == "2" echo [?] = AMD Display Driver (AMD Display Drivers)                 Not Installed && goto :Con3
:Con3
for /F "delims=" %%G in ('findstr /i /M "atihd" %Windir%\Inf\oem*.inf') do if exist %%G set "inst4=1"
if "%inst4%" == "1" echo [?] = AMD HDMI Driver (For HDMI Display)                         Installed && goto :Con4
if "%inst4%" == "2" echo [?] = AMD HDMI Driver (For HDMI Display)                       Not Installed && goto :Con4
:Con4
for /F "tokens=4,5,6,10*" %%G in ('%CIM%') do if "%%G %%H %%I %%J" == "Visual C++ 2010 10.0.30319" set "inst5=1"
if "%inst5%" == "1" echo [?] = Microsoft Visual C++ 2010                                  Installed && goto :Con5
if "%inst5%" == "2" echo [?] = Microsoft Visual C++ 2010                                Not Installed && goto :Con5
:con5
for /F "tokens=4,5,6,11*" %%G in ('%CIM%') do if "%%G %%H %%I %%J" == "Visual C++ 2012 11.0.50727" set "inst6=1"
if "%inst6%" == "1" echo [?] = Microsoft Visual C++ 2012                                  Installed && goto :Con6
if "%inst6%" == "2" echo [?] = Microsoft Visual C++ 2012                                Not Installed && goto :Con6
:con6
for /F "tokens=3,4,5,6,7*" %%G in ('%CIM%') do if "%%G" == "HydraVision" set "inst7=1"
if "%inst7%" == "1" echo [?] = HydraVision                                                Installed && goto :Con7
if "%inst7%" == "2" echo [?] = HydraVision                                              Not Installed && goto :Con7
:con7
for /F "tokens=3,4,5,6,7*" %%G in ('%CIM%') do if "%%G %%H %%I %%J" == "AMD Accelerated Video Transcoding" set "inst8=1"
if "%inst8%" == "1" echo [?] = AMD Accelerated Video Transcoding                          Installed && goto :Con8
if "%inst8%" == "2" echo [?] = AMD Accelerated Video Transcoding                        Not Installed && goto :Con8
:con8
for /F "tokens=3,4,5,6,7*" %%G in ('%CIM%') do if "%%G %%H %%I" == "AMD AVIVO Codecs" set "inst9=1"
for /F "tokens=3,4,5,6,7*" %%G in ('%CIM%') do if "%%G %%H %%I" == "AMD AVIVO64 Codecs" set "inst9=1"
for /F "tokens=3,4,5,6,7*" %%G in ('%CIM%') do if "%%G %%H %%I" == "AMD Video Converter" set "inst9=1"
if "%inst9%" == "1" echo [?] = AMD Video Converter                                        Installed && goto :Con9
if "%inst9%" == "2" echo [?] = AMD Video Converter                                  Not Installed && goto :Con9
:con9
for /F "tokens=3,4,5,6,7*" %%G in ('%CIM%') do if "%%G %%H %%I %%J %%K" == "AMD Drag and Drop Transcoding" set "instA=1"
if "%instA%" == "1" echo [?] = AMD Drag and Drop Transcoding                              Installed && goto :ConA
if "%instA%" == "2" echo [?] = AMD Drag and Drop Transcoding                            Not Installed && goto :ConA
:conA
for /F "tokens=3,4,5,6,7*" %%G in ('%CIM%') do if "%%G %%H %%I %%J" == "AMD Media Foundation Decoders" set "instB=1"
if "%instB%" == "1" echo [?] = AMD Media Foundation Decoders                              Installed && goto :ConB
if "%instB%" == "2" echo [?] = AMD Media Foundation Decoders                            Not Installed && goto :ConB
:conB
for /F "tokens=3,4,5,6,7*" %%G in ('%CIM%') do if "%%G" == "ccc-utility" set "instC=1"
for /F "tokens=3,4,5,6,7*" %%G in ('%CIM%') do if "%%G" == "ccc-utility64" set "instC=1"
for /F "tokens=3,4,5,6,7*" %%G in ('%CIM%') do if "%%G %%H" == "AMD Fuel" set "instC=1"
for /F "tokens=3,4,5,6,7*" %%G in ('%CIM%') do if "%%G %%H" == "AMD Fuel64" set "instC=1"
for /F "tokens=3,4,5,6,7*" %%G in ('%CIM%') do if "%%G %%H %%I" == "Catalyst Control Center" set "instC=1"
for /F "tokens=3,4,5,6,7*" %%G in ('%CIM%') do if "%%G %%H %%I %%J %%K" == "Catalyst Control Center - Branding" set "instC=1"
if "%instC%" == "1" echo [?] = Catalyst Control Center                                    Installed && goto :ConC
:conC
set "OPT=error"
set /p OPT= %=%
set "Timeout=ping -n 2 127.0.0.1"
set "inst1=--------------------------------------------------------------------------------------"
set "inst2=--------------------------------------------------------------------------------------"
set "inst3=--------------------------------------------------------------------------------------"
set "inst4=--------------------------------------------------------------------------------------"
set "inst5=--------------------------------------------------------------------------------------"
set "inst6=--------------------------------------------------------------------------------------"
set "inst7=--------------------------------------------------------------------------------------"
set "inst8=--------------------------------------------------------------------------------------"
set "inst9=--------------------------------------------------------------------------------------"
set "instA=--------------------------------------------------------------------------------------"
set "instB=--------------------------------------------------------------------------------------"
set "instC=--------------------------------------------------------------------------------------"
if "%OPT%" == "1" Endlocal & cd /d %~dp0 & Start /Min CleanerB\Launcher.lnk >nul 2>&1 & goto :Done
if "%OPT%" == "2" Endlocal & cd /d %~dp0 & Start /Min CleanerA\Launcher.lnk >nul 2>&1 & goto :Done
if "%OPT%" == "3" Endlocal & cd /d %~dp0 & Start /Min CleanerB\GRestart.lnk >nul 2>&1 & goto :Done
if not exist %Windir%\SysWOW64\AtBroker.exe goto :Beginning
if exist %Windir%\SysWOW64\AtBroker.exe goto :Beginning
:Done
Exit
