471,306 Members | 1,207 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,306 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 1938
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

29 posts views Thread by Guillaume Dargaud | last post: by
reply views Thread by rosydwin | last post: by

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.