Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   detect which dll is registered? (http://forums.winamp.com/showthread.php?t=265225)

xirisone 6th February 2007 12:23

detect which dll is registered?
 
Hi,

on a target PC several versions of a dll exist in different folders and I don't know the folders.

How do I know which dll is currently registered = active?

TIA,
xiris

kichik 6th February 2007 18:46

That depends on the DLL. Every DLL saves information differently or doesn't save information at all. If it's a COM DLL, you can normally find its path under HKCR\CLSID\{dll guid}\InprocServer32.

xirisone 7th February 2007 10:54

It is a COM-DLL, it has been registered with Regsvr32.

Scenario on target-PC:

c:\windows\mydll.dll
c:\tools\mydll.dll <- this dll is registered=active
d:\software\mydll.dll

I want to find out which dll is currently active on the target PC so I can e.g. check it's version.

Can I detct via NSIS which of the Dlls is currently used?

TIA,
xiris

onad 7th February 2007 11:41

NSIS is actually used to created installers ;) and, yes via a Process plugin you could detect if a DLL is running. This is hower not a trivial task.

Better is to refrase your question I think: If we would know what ultimately you want to achieve, we could give a more detailed and helping answer.

xirisone 7th February 2007 20:25

@onad

Ok - I'll try to clarify the task. On the target PC we have several products that use a dll with a certain name.
My NSIS Installer is only allowed to update a specific dll if the version is 11.22.33.44. I know the absolute path of this dll and so I can check it's version using ${GetFileVersion}.
So far so good. But I also have to make sure that this dll is the one which is still used = which is still registered. If 'my' dll is no longer active and I install a new version I might break the other product's active dll which is installed in a different absolute path which I don't know.

So if NSIS could tell me from the registry the path of the dll which is currently registered I could act on the save side.

TIA,
xiris


All times are GMT. The time now is 04:44.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.