Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load registry in listbox?

Status
Not open for further replies.

ThaVolt

Programmer
Aug 12, 2002
34
NL
Hi I want to make a program that shows all the items from the LOCAL_MACHINE/software/microsoft/windows/currentversion/run so i can check fast if there are any virusses adware etc on my disk.. i tried some code my dont enough skill to do it hope u guys can help me out.. i want both description and file location in the box any suggestions?

Greetings,

ThaVolt
 
Try this:
Let me know if this helps
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
I've checked the site above but i'm stuck again :(.. as i use the following code:

Private Sub Form_Load()
QueryValue "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\run\", "StringValue"
End Sub

The program will return an empty msgbox.

Thnax in advance,

Greetings,

ThaVolt
 
The second argument to QueryValue function should be the name (technically speaking, the Value Name) of a Registry entry under the key. "StringValue" was just an example (like "YourNameHere"), so replace that literal with a variable that contains the Value Name that you are actually looking for.

But from your original posting, I gather that you won't know what Value Names might appear under that Registry key. So you FIRST (but after you have a handle to the Registry key) need to be using a different API function to get that information: RegEnumValue. That KnowledgeBase article mentions this function, but unfortunately does not describe it. You'll call that function repeatedly, getting one Value Name from each call, until you have retrieved them all. As you retrieve each Value Name, you can use the QueryValue function to retrieve the corresponding Value Data.

I will leave it to you to search for documentation on the RegEnumValue function. And if you need additional help on that function, you might want to post your question on the Visual Basic(Microsoft) Win32API forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top