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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Registry Name Key Value

Status
Not open for further replies.

CannonEnt

Programmer
Oct 21, 2001
5
GB
I am writing a Vb 5 App that requires the Date Installed and more important The Location os the Database. The problem is that the Main database location could be anywhere that the user puts it. How can when the user first loads the app to write the location to a text file or even to the Registry.

I am trying to use the RegObj.dll, i can get the Key name but i need to search all the Name values and even change them from time to time. How do i loop through the keys under a Key and then loop until the end of that SubKey?

Thanks in advance

Stephen.
 
Does the user tell you were it is the first time? If you know where it is then, use the SaveSetting function

example

[COLOR== blue]
SaveSetting "Databaser2000", "Settings", "DatabaseLoc", pathtodb
[/color]

to get the setting do,

Path = GetSetting "Databaser2000", "Settings", "DatabaseLoc", "NotFound"

Now, the interesting thin about the getsetting, if it doesn't find that (like if the program was never run yet) it will put notfound,or whatever you put in the default paramater.

so you go like this

if path = "NotFound" then
<-put db locating code here&quot;
end if

Okay,
You can also email if I wasn't correct in assuming you knew were it was,

Brad,
Hey! email me any time! Bradsvb@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top