In the last post I forgot to say that the answer is also on Microsoft's Site @:
http://support.microsoft.com/kb/241257Now for the additional script, I would like to thank Simon Price for creating this and saving me loads of time.
This will take a little longer to set up but will save you loads fo time in the long run.
As before you will need to create a batch file.
Copy all ofthe following text in to a bacth file and save it with a name of removehardware.bat somewhere easy like C:\removehardware\
@echo off
CLS
set _ver=Version 2.0 (May 2008)
REM Remove non present hardware in machines
REM Called by : Runs Independantly
REM Calls : devcon.exe
REM by Simon Price
REM August, 2007
REM email : abitpricey@gmail.com | sprice@techarchsolutions.com
REM Check for updates here:
REM
REM Updated May 2008 - removed need for lmod - should work on x64 Windows
SETLOCAL ENABLEDELAYEDEXPANSION
set _base=%~dp0
set _scriptname=%~n0
set path=%_base%_bin;%path%
set title=%_scriptname%
TITLE %title% %_ver%
echo ====================================================
echo =====Removing Non-Present hardware from Machine=====
echo ====================================================
echo.
echo Version %_ver%
echo Written by Simon Price
echo Questions / Problems / Suggestions - abitpricey@gmail.com
echo or sprice@techarchsolutions.com
echo Please Wait
set _outfoldroot=%systemdrive%\admin\%_scriptname%
if not exist "%_outfoldroot%" md "%_outfoldroot%"
set _classsearch=net CDROM DiskDrive display fdc hdc keyboard media monitor scsiadapter scsi unknown floppydisk processor volume MultiFunction mouse battery hidclass system usb SmartCardReader Biometric SBP2 MultiPortSerial DellSerialDevice 61883
set _find=%_outfoldroot%\%computername%_find.txt
set _removal=%_outfoldroot%\%computername%_removal.txt
set _findall=%_outfoldroot%\%computername%_findall.txt
rem remove existing files
if exist "%_find%" del /q "%_find%"
if exist "%_findall%" del /q "%_findall%"
for %%a in (%_classsearch%) do (
rem devcon findall =%%a | sort | lmod /l* /b: [$1] | findstr /iv /c:"matching device" >> "%_findall%"
for /f "tokens=1 delims=: " %%b in ('devcon findall ^=%%a ^| findstr /iv /c:"matching device"') do @echo %%b>> "%_findall%"
)
)
for %%a in (%_classsearch%) do (
rem devcon find =%%a | sort | lmod /l* /b: [$1] | findstr /iv /c:"matching device" >> "%_find%"
for /f "tokens=1 delims=: " %%b in ('devcon find ^=%%a ^| findstr /iv /c:"matching device"') do @echo %%b>> "%_find%"
)
@echo. > "%_removal%"
set _found=0
for /f "tokens=* delims=" %%a in (%_findall%) do (
set _found=0
for /f "tokens=* delims=:" %%b in ('findstr /L /X /C:"%%a" "%_find%"') do (
set _found=1
)
if /i .!_found!.==.0. (
for /f "tokens=1,2* delims=:" %%c in ('devcon find "@%%a" ^| findstr /iv /c:"matching device"') do (
set _descr=%%d
for /f "tokens=1 delims=\" %%A in ("%%c") do set _descr1=%%A
)
@echo [!_descr1!],!_descr!,"%%a" >> "%_removal%"
@echo removing device : [!_descr1!]!_descr!
devcon remove "@%%a"
)
)
echo Complete. Output files are located here:
@echo [%_outfoldroot%]
echo.
echo.
goto :END
:SYNTAX
@echo.
@echo %message%
@echo SYNTAX : %_scriptname% ^ ^
sleep 5
goto :END
:END
You will now need to find yourself a copy of "devcon" which was listed in one of the earlier posts and save it to the same folder.
now open a run command (windows key + R, type cmd + enter)
and change to the new folder, type the following:
C:
Cd C:\removehardware
removehardware.bat
Once you have done that you should probably go back in to device manager and scan for changes just to make sure notjhing critical was removed
cheers
Will
(And thanks again Simon

)