get registry key how do i:

i have the registry of
[HKEY_LOCAL_MACHINE\SOFTWARE\ArGoSoft\Mail Server\Setup]
"Program Path"="c:\\Program Files\\ArGo Software Design\\Mail Server\\"
how do i get Program Path="c:\Program Files\ArGo Software Design\Mail Server\" ???

thx
Johnny
aka Pern
JohnnyAsked:
Who is Participating?
 
ptakjaCommented:
Hey Pern.

Try something like this:

This code assumes you have this line at the top of your file:

Imports Microsoft.Win32


Dim RegKey As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\ArGoSoft\Mail Server\Setup")
Dim val As String = RegKey.GetValue("Program Path")

Jeff
0
 
JohnnyAuthor Commented:
thx you works great my problemw as putting inports outside of subs

thx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.