Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
what is the registry key using which one can find installation path of one's dll? My DLL uses one excel file as database. This excel file is kept along with dll at this installation path. At run time,to use this file, DLL must know its installation path. I guess that is stored in windows registry. Sometimes, I see same value getting reflected in many keys. What is definite key where it can be found?
Posted

There is no such thing as one single place.

Majority of DLLs are associated with HKEY_CLASSES_ROOT and HKEY_CLASSES_ROOT\CLSID. Let's see how the associations between them works.

For example, take one class, the one with CLSID (others can represent data file extenstions and other keys) "HKEY_CLASSES_ROOT\device\CLSID". Take its Default value for CLSID represents the UID for registered class. Find this UID in Registry. You will come to HKEY_CLASSES_ROOT\CLSID\{4315D437-5B8C-11D0-BD3B-00A0C911CE86}. Under this node you will find the DLL which is a in-proc server: HKEY_CLASSES_ROOT\CLSID\{4315D437-5B8C-11D0-BD3B-00A0C911CE86}\InprocServer32. The Default value in my system is C:\WINDOWS\system32\devenum.dll.

This is how COM components are registered. Install something to see how it matches components you install. There are many other locations where DLLs can be registered, but chances are, you need the locations I demonstrated.

Good luck.
—SA
 
Share this answer
 
v3
Comments
luisnike19 1-Apr-11 16:04pm    
That's right too. My 5.
I don't know what Rajesh is trying to do but anyway he got an ideas where to find that.
Sergey Alexandrovich Kryukov 1-Apr-11 16:16pm    
Agree. Thanks for the vote.

By the way, its 1ts of April today! Have some fun!
Please see my 1st of April post.
Here (with my "Answer" of course):
http://www.codeproject.com/Answers/175616/WARNING-Black-Line-of-Death-in-windows-phone-7.aspx

Everyone sais it's really interesting.

Cheers! :-)
--SA

--SA
luisnike19 2-Apr-11 0:25am    
I already read it and and vote since the morning. It was great
Sergey Alexandrovich Kryukov 2-Apr-11 16:22pm    
Thank you very much.
--SA
Who did this installer? If you did it, you must know if you are storing something in the registry, and where.
If not, it's not possible to know exactly whichi registry keys are created or just if it's documented.
Go to the regedit and Find all the keys you need.
 
Share this answer
 
Comments
Rajesh G Manwani from Mumbai 1-Apr-11 4:03am    
Installer is not putting anything in registry. I guess this is not required as Windows is expected to automatically creates registry entry when regsvr is called. My question is related to this situation. What is the standard key path where path of registered module gets stored against the CLSID?
Sergey Alexandrovich Kryukov 1-Apr-11 15:14pm    
I think you're right. My 5 for your Answer.

It's not quite clear to me what OP tries to achieve, but I decide to show how COM components are registered in the Registry and found. I'm not sure if it makes sense to dig into that. I would not do it.

Please see my Answer.--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900