Read a part of the registry
Read a part of the registry
Read a part of the registry
Read a part of the registry
Read a part of the registry
Read a part of the registry Read a part of the registry Read a part of the registry Read a part of the registry Read a part of the registry Read a part of the registry Read a part of the registry Read a part of the registry
Read a part of the registry Read a part of the registry
Read a part of the registry
Go Back  Xtreme Visual Basic Talk > > > Read a part of the registry


Reply
 
Thread Tools Display Modes
  #1  
Old 02-08-2014, 03:48 AM
winmaster winmaster is offline
Newcomer
 
Join Date: Feb 2014
Posts: 3
Question Read a part of the registry


Hello everyone,

I have searched a lot today but I can't find anything in help. I want to build an app that will provide information from one part of the registry.

So what I mean? I mean that when I open the app I want to see all of the information from example HKEY_LOCAL_MACHINE --> Software --> Microsoft --> Windows --> CurrentVersion.

Is there any way to do that? I can't find anywhere. Thanks for the help in advance.
Reply With Quote
  #2  
Old 02-08-2014, 08:31 AM
PlausiblyDamp's Avatar
PlausiblyDampRead a part of the registry PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

The following snippet might get you started
Code:
        Dim regKey As RegistryKey

        regKey = Registry.LocalMachine.OpenSubKey("Software\Microsoft\Windows\CurrentVersion")

        Debug.WriteLine("***Subkeys***")
        For Each x In regKey.GetSubKeyNames
            Debug.WriteLine(x)
        Next

        Debug.WriteLine("***Value names***")
        For Each x In regKey.GetValueNames
            Debug.WriteLine(x)
        Next
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #3  
Old 02-11-2014, 01:32 PM
winmaster winmaster is offline
Newcomer
 
Join Date: Feb 2014
Posts: 3
Default

Okay, that was very helpful. But I have two more questions:
1. Is there a way to show only one registry line and 2. how to display this information
Reply With Quote
  #4  
Old 02-11-2014, 05:33 PM
PlausiblyDamp's Avatar
PlausiblyDampRead a part of the registry PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

The above code was just to give an idea of how you could access the registry, to answer your questions though...

1. Yes, don't loop over the lines use the properties / methods of the RegistryKey variable to access the value you are after.

2. Depends on where you want to display it really.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #5  
Old 02-15-2014, 02:38 AM
winmaster winmaster is offline
Newcomer
 
Join Date: Feb 2014
Posts: 3
Default

Okay, I'll try some things. Anyway - thanks for the help
Reply With Quote
Reply

Tags
read the registry, windows registry


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Read a part of the registry
Read a part of the registry
Read a part of the registry Read a part of the registry
Read a part of the registry
Read a part of the registry
Read a part of the registry Read a part of the registry Read a part of the registry Read a part of the registry Read a part of the registry Read a part of the registry Read a part of the registry
Read a part of the registry
Read a part of the registry
 
Read a part of the registry
Read a part of the registry
 
-->