Old 6th February 2007, 12:23   #1
xirisone
Junior Member
 
Join Date: Feb 2007
Posts: 19
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
xirisone is offline   Reply With Quote
Old 6th February 2007, 18:46   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 7th February 2007, 10:54   #3
xirisone
Junior Member
 
Join Date: Feb 2007
Posts: 19
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
xirisone is offline   Reply With Quote
Old 7th February 2007, 11:41   #4
onad
Senior Member
 
onad's Avatar
 
Join Date: Dec 2004
Location: Turkey
Posts: 447
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.

"Just do it"
onad is offline   Reply With Quote
Old 7th February 2007, 20:25   #5
xirisone
Junior Member
 
Join Date: Feb 2007
Posts: 19
@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
xirisone is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump