@ECHO OFF TITLE WinXP-IE - Intel USB3.x HC-Switch Uninstaller PushD "%~dp0" Set "VERSION=(C216)" Set "BatchDir=%~dp0" If [%BatchDir:~-1%]==[\] Set "BatchDir=%BatchDir:~0,-1%" ECHO \\!// ECHO (o o) ECHO ---------------------------------oOOo-(_)-oOOo--------------------------------- ECHO Uninstallation of Intel USB3.x HC-Switch %VERSION% ECHO =============================================================================== FLTMC >NUL 2>&1 || Set _=^"Set "_ELEV=1" ^& CD /d """%~dp0""" ^& "%~f0" %*^" && ((If "%_ELEV%"=="" (ECHO. & ECHO Requesting administrator privileges . . . & ((PowerShell -nop -c START "" CMD -args '/d/x/s/v:off/r',$env:_ -Verb RunAs >NUL 2>NUL) || (mshta vbscript:execute^("CreateObject(""Shell.Application"").ShellExecute(""CMD"",""/d/x/s/v:off/r"" & CreateObject(""WScript.Shell"").Environment(""PROCESS"")(""_""),,""RunAs"",1)(Window.Close)"^) >NUL 2>&1))) Else (ECHO. & ECHO This script requires administrator privileges. & PAUSE)) & EXIT /b) ping -n 1 localhost 1>NUL If "%Processor_Architecture%" == "x86" VER | FindStr /l /i "5.1 5.2" 1>NUL && GoTo DeviceCheck COLOR 0C ECHO. ECHO ERROR: This Uninstaller is only for Windows XP/2003 32-bit. ECHO. PAUSE EXIT :DeviceCheck Reg Query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ACPI\PNP0A08" >NUL 2>&1 && GoTo Compatible COLOR 0C ECHO. ECHO ERROR: No compatible Hardware device found. ECHO. PAUSE EXIT :Compatible ECHO. ECHO Do you want to UNINSTALL the Intel USB3.x HC-Switch %VERSION% driver? ECHO. PAUSE ECHO. ECHO -------------------------------[ Uninstalling ]-------------------------------- :SKIP ECHO. ECHO Restoring old "acpi.sys" file . . . If Exist "%SystemRoot%\Driver Cache\acpi.sys" COPY "%SystemRoot%\system32\drivers\acpi.sys.bak" "%SystemRoot%\Driver Cache\acpi.sys" /V /Y /Z 1>NUL MOVE /Y "%SystemRoot%\system32\drivers\acpi.sys.bak" "%SystemRoot%\system32\drivers\acpi.sys" PushD "%~dp0" ECHO. ECHO Uninstalling Intel USB3.x HC-Switch %VERSION% driver . . . ".\bin\DPInst.exe" /q /d /u "%BatchDir%\driver\z1-iu3hs.inf" >NUL 2>&1 ECHO. ECHO Granting Administrator access to the Enum Registry Keys . . . ".\bin\regini.exe" -m \\%ComputerName% ".\bin\regini - grant.ini" ECHO. ECHO Removing extra Registry settings . . . RunDll32.exe SetupAPI.dll,InstallHinfSection DefaultUninstall 128 .\driver\z2-iu3hs.inf ECHO. ECHO Revoking Administrator access to the Enum Registry Keys . . . ".\bin\regini.exe" -m \\%ComputerName% ".\bin\regini - revoke.ini" ECHO. ECHO ---------------------------------[ Finished ]---------------------------------- ECHO. ECHO A computer restart is required for the new settings to take effect. :INPUT-RIU3HS Set "OPTION=" Set /p "OPTION=Enter "1" to Restart Now or "0" to Restart Later: " If /i "%OPTION%"=="1" GoTo RESTART If /i "%OPTION%"=="0" EXIT GoTo INPUT-RIU3HS :RESTART ECHO. ECHO The Computer will now restart in 5 seconds . . . ping -n 6 localhost 1>NUL ShutDown -r -t 0 EXIT