473,385 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Reading Windows Registry

Hi all

I need to make a program that will loop inside the HKEY_CLASSES_ROOT
and find the name of the DLL associated with a ClassID.

I want to know how can I possible loop inside the classes id ?

I tried to look into the documentation of the RegistryKey class but I
didn't find something useful.

Thanks!

Eduardo

Jan 25 '06 #1
4 2053
using (RegistryKey keyClsid =
Registry.ClassesRoot.OpenSubKey("CLSID"))
{
foreach (string subKeyName in keyClsid.GetSubKeyNames())
{
using (RegistryKey subkey = keyClsid.OpenSubKey(subKeyName))
{
// do something
}
}
}

Jan 25 '06 #2
em*******@gmail.com wrote:
I need to make a program that will loop inside the HKEY_CLASSES_ROOT
and find the name of the DLL associated with a ClassID.

I want to know how can I possible loop inside the classes id ?

I tried to look into the documentation of the RegistryKey class but I
didn't find something useful.


I suspect that RegistryKey.GetSubKeyNames() is what you're after.

Jon

Jan 25 '06 #3
Eduardo,

You will want to look for the following path:

HKEY_CLASSES_ROOT\CLSID\<clsid>\InProcServer32

Then, you want to get the default value, which should be the path to the
assembly.

<clsid> is the clsid of the component in registry format (with curly
braces).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<em*******@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Hi all

I need to make a program that will loop inside the HKEY_CLASSES_ROOT
and find the name of the DLL associated with a ClassID.

I want to know how can I possible loop inside the classes id ?

I tried to look into the documentation of the RegistryKey class but I
didn't find something useful.

Thanks!

Eduardo

Jan 25 '06 #4
Hi

This was very helpful. But what I should do in this case ?

I'm looking for the assemble name for the MSI.DLL, and the only thing I
can find by the class id is in:

HKEY_CLASSES_ROOT\TypeLib\{000C1092-0000-0000-C000-000000000046}

Thanks!

Eduardo

Jan 30 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Dhilip Kumar | last post by:
Hi All, I'm writing a Windows Service app using C#. I need to read some configuration settings before the service starts up. These settings will be used by the service in its operation. ...
0
by: Simon Beetham | last post by:
Hi all, My little application is in VB2005 Pro. I'm doing my development on WinXP 64-bit. I was having a problem reading a registry key under HKLM and thought it was a permission issue. ...
5
by: UJ | last post by:
I have a system that has five programs that all communicate with each other via Message Queues. Works well. One program is a watchdog that will make sure the others are up and going. Currently I...
4
by: RhavoX | last post by:
Hi. This may be a very stupid question but I'll leave you to judge it ;) I know there were lots of questions about this but none of the answers suits me. I'm wondering how to get the BINARY type...
29
by: Guillaume Dargaud | last post by:
Hello all, anybody knows if there's some ANSI-C conformant code around that can read Windows-style .ini files ? I don't care about writing to it but I need to be able to read it from various OSs,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.