PDA

View Full Version : VBS Script to remove UpperFilters & LowerFilters Keys


AtYourService
10-12-2009, 02:29 AM
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''
' Script to Blow out the UpperFilters & LowerFilters Key
' Your CD drive or DVD drive is missing or is not recognized
' by Windows or other programs.
' http://support.microsoft.com/kb/314060
' will@whatsmypass.com
' 10/11/2009
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''


Const HKEY_LOCAL_MACHINE = &H80000002

strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & _
strComputer & "\root\default:StdRegProv")

strKeyPath = "SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318}"
strValueName = "UpperFilters"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValu e

If IsNull(strValue) Then
Wscript.Echo "The UpperFilters registry key does not exist. Checking for LowerFilters key."
Else
Wscript.Echo "The UpperFilters key exists, now deleting & Checking for LowerFilters key."
DelKey = objRegistry.DeleteValue(HKEY_LOCAL_MACHINE, strKeyPath, strValueName)
if DelKey <> 0 then
WScript.Echo "Error deleting value: " & DelKey
else
WScript.Echo "Successfully deleted value: " & strValueName
end if
End If


strKeyPath = "SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318}"
strValueName = "LowerFilters"
objRegistry.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValu e

If IsNull(strValue) Then
Wscript.Echo "The LowerFilters registry key does not exist."
Else
Wscript.Echo "The LowerFilters key exists, now deleting."
DelKey = objRegistry.DeleteValue(HKEY_LOCAL_MACHINE, strKeyPath, strValueName)
if DelKey <> 0 then
WScript.Echo "Error deleting value: " & DelKey
else
WScript.Echo "Successfully deleted value: " & strValueName & vbCrLf & "Please Reboot."

end if
End If

Tweak
10-12-2009, 02:33 AM
Although I have this as a regfile I love that you contribute with scripts, thanks!:cool:

Methical
10-12-2009, 02:58 AM
Thanks for the script AtYourService !
Awesome work as always !

I thought you would of done it in assembly, with ( and a quote ) "pretty buttons" lol

AtYourService
10-12-2009, 04:27 AM
heres your asm :)
http://img261.imageshack.us/img261/3299/filters.png
http://whatsmypass.com/filters.exe


can also be easily done in a batfile and reg file

filters.bat
REG DELETE HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E 965-E325-11CE-BFC1-08002BE10318} /v UpperFilters
REG DELETE HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E 965-E325-11CE-BFC1-08002BE10318} /v LowerFilters

filters.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Class\{4D36E965-E325-11CE-BFC1-08002BE10318}]
"UpperFilters"=-
"LowerFilters"=-

Methical
10-12-2009, 05:35 AM
:eek:

Now thats pretty lol

Good job as always AtYourService !

JosephLeo
10-12-2009, 05:45 AM
This "UpperFilters" and "LowerFilters" is a new term to me. Anyone care to explain?

greggh
10-12-2009, 03:55 PM
This "UpperFilters" and "LowerFilters" is a new term to me. Anyone care to explain?

A lot of times when you are working on a windows machine and the CD/DVD drives dont work or do not even show up this is the problem. There are entries in the registry for UpperFilters and LowerFilters that are in the key for the CD/DVD device. These can get corrupted, point to files that dont exist anymore, and just generally get in the way.

Removing these entries in the registry will bring the CD/DVD drives back to fully functional most of the time.

JosephLeo
10-12-2009, 05:07 PM
A lot of times when you are working on a windows machine and the CD/DVD drives dont work or do not even show up this is the problem. There are entries in the registry for UpperFilters and LowerFilters that are in the key for the CD/DVD device. These can get corrupted, point to files that dont exist anymore, and just generally get in the way.

Removing these entries in the registry will bring the CD/DVD drives back to fully functional most of the time.

Ahh, thanks. Very insightful, I love learning new terms :)

ITMAN
10-13-2009, 08:33 AM
Thankyou! Lovely little program - better than the script i was running

iisjman07
10-13-2009, 05:57 PM
heres your asm

http://whatsmypass.com/filters.exe

Awesome, you've saved me time and trouble, thanks!