Sign in to follow this  
Followers 0
blademonkey

Makeshift WMF hotfix check

9 posts in this topic

Greetings for noobish land,

I'm trying to find a way (any way) of determining whether or not a DLL is currently registered or unregistered.

This is in reference to last week's security hole in windows' with the WMF.

Please advise.

Thanks.

-Blademonkey


---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites



I could not find any answer in AutoIT but I found this with google

http://www.developerfusion.co.uk/show/3479/



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I would think you could use " If FileExists() " to see if the d DLL was in the system folder.

; checks to see if a file exists in system directory

#include <GuiConstants.au3>

$file_name= @SystemDir & "\avisynth.dll"
If FileExists($file_name) Then
    MsgBox(0, $file_name, "FILE DOES EXIST")  
Else
    MsgBox(0, $file_name, "FILE DOES NOT EXIST")    
EndIf
Edited by peter1234

Share this post


Link to post
Share on other sites

I could not find any answer in AutoIT but I found this with google

http://www.developerfusion.co.uk/show/3479/

Saw that one too, but I can't use that code.

---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

I would think you could use " If FileExists() " to see if the d DLL was in the system folder.

; checks to see if a file exists in system directory

#include <GuiConstants.au3>

$file_name= @SystemDir & "\avisynth.dll"
If FileExists($file_name) Then
    MsgBox(0, $file_name, "FILE DOES EXIST")  
Else
    MsgBox(0, $file_name, "FILE DOES NOT EXIST")    
EndIf
Having the DLL in the system folder does not register it.

Thanks for the reply. I appreciate the effort.


---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

As I'm understanding it, the RegSvr32 unregister fix makes the DLL unavailable as a COM server; you could test to see if you could instantiate one of the COM objects that the DLL provides (but I don't know what they are...). If you can do so then you're still registered...

Edit: Trying Paint.Picture object... Nope, served by mspaint.exe... Carrying on...

Edited by DaveF

Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Share this post


Link to post
Share on other sites

The following should detect if the DLL is registered:

RegRead("HKEY_CLASSES_ROOT\Preview.Preview", "")
If @error Then
    MsgBox(4096, "", "DLL NOT registered.")
Else
    MsgBox(4096, "", "DLL registered.")
EndIf

The ProgID Preview.Preview is a COM object provided by shimgvw.dll. Unregistering the DLL should cause this registry entry to be removed.

Share this post


Link to post
Share on other sites

The following should detect if the DLL is registered:

RegRead("HKEY_CLASSES_ROOT\Preview.Preview", "")
If @error Then
    MsgBox(4096, "", "DLL NOT registered.")
Else
    MsgBox(4096, "", "DLL registered.")
EndIf

The ProgID Preview.Preview is a COM object provided by shimgvw.dll. Unregistering the DLL should cause this registry entry to be removed.

Attaboy. :P

Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Share this post


Link to post
Share on other sites

The following should detect if the DLL is registered:

RegRead("HKEY_CLASSES_ROOT\Preview.Preview", "")
If @error Then
    MsgBox(4096, "", "DLL NOT registered.")
Else
    MsgBox(4096, "", "DLL registered.")
EndIf

The ProgID Preview.Preview is a COM object provided by shimgvw.dll. Unregistering the DLL should cause this registry entry to be removed.

Rockin'!

Thanks, that did the trick.


---"Educate the Mind, Make Savage the Body" -Mao Tse Tung

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0