Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / August 2006

Tip: Looking for answers? Try searching our database.

Registry read

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark - 30 Aug 2006 22:09 GMT
I am trying to read a key in the registry but I get nothing in response and I
copied the code from the help files.
Here is the code:
Dim readValue As Object
       readValue =  
My.Computer.Registry.GetValue("HKEY_CURRENT_USER\MyTestKey", "Name", Nothing)
       MsgBox("The value is " & CStr(readValue))
Also, how would you read the other lines in the key as there is no place for
an index?
Any help would be appreciated.
UsualDosage - 30 Aug 2006 22:52 GMT
Dim regKey As RegistryKey
Dim readValue As Object
regKey = Registry.LocalMachine.OpenSubKey("HKEY_CURRENT_USER\MyTestKey", True)
readValue = regKey.GetValue("Name")
regKey.Close()

(See also:
http://msdn2.microsoft.com/en-us/library/microsoft.win32.registrykey.getvalue.aspx)
---
"Quae narravi, nullo modo negabo."

> I am trying to read a key in the registry but I get nothing in response and I
> copied the code from the help files.
[quoted text clipped - 6 lines]
> an index?
> Any help would be appreciated.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.