Reading Registry Values

I need to read some registry values, not my applications registry but for example this key:

HKEY_LOCAL_MACHINE\\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CSDVersion



jcorbinAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Erick37Connect With a Mentor Commented:
This site contains functions for VB to read and write registry entries:

http://www.thescarms.com/vbasic/Registry.htm
0
 
AnswerTheManCommented:
add a reference to 'registry access functions' .

add the following code into your form

Option Explicit

Private Sub Command1_Click()
Dim MyRegAs New Registry

MyReg.UpdateKey HKEY_CURRENT_USER, "Control panel\desktop", "SCRNSAVE.EXE", "your screensaver path"
Set MyReg= Nothing
End Sub
0
 
jcorbinAuthor Commented:
Worked great! thanks!
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
AnswerTheManCommented:
which one ?
the "Accepted Answer" or the "Comment" ?
0
 
jcorbinAuthor Commented:
The accepted answer. never could find the type lib for 'registry access functions' ??? Is that a ms library??
0
 
AnswerTheManCommented:
dependns on version you have.
0
 
Erick37Commented:
Functions will use the built-in APIs without the need to distribute another DLL with your program.

I always try to use code before resorting to an outside DLL or OCX.
0
All Courses

From novice to tech pro — start learning today.