Where can i find in the registry the value of the savesetting function of vb6? im getting the value using GetSetting("Project", "Options", "Auth").. anyone who has an idea on how to find this value in the registry?

Dani AI

Generated

Short answer: was on the right track — VB's built‑in SaveSetting/GetSetting store per‑user application settings in the VB/VBA program-settings area of the registry. SaveSetting will create the keys for the application/section/key you pass and is intended for simple, per‑user configuration (not machine‑wide settings). (learn.microsoft.com)

A few technical details that often help when tracking values down: the saved values are written as plain strings (REG_SZ); VB coerces non‑string values to text when writing, and GetSetting returns a string (you can supply a default to return when the name isn’t found). Use GetAllSettings to enumerate a section and DeleteSetting to remove keys or whole sections. These functions behave as convenience wrappers over the per‑user registry area and are best for user preferences, not for system or sensitive data. (flylib.com)

If GetSetting returns a value but RegEdit doesn’t show it, check these common causes: the application may be running under a different user account (so the data is in that user’s hive), or you’re tripping 32‑bit/64‑bit registry views on a 64‑bit OS. On 64‑bit Windows there are separate views (and a separate RegEdit executable in %systemroot%\SysWOW64 if you need the 32‑bit view); also inspect HKEY_USERS for other SIDs if the process runs as another account. These are the usual reasons values appear via VBA but seem “invisible” in your copy of RegEdit. (learn.microsoft.com)

Practical example and cautions:

' Save and read a simple per-user setting
SaveSetting "MyApp", "Prefs", "AuthToken", "abc123"
Dim token As String
token = GetSetting("MyApp", "Prefs", "AuthToken", "")

' Remove a section or the whole app
DeleteSetting "MyApp", "Prefs"
DeleteSetting "MyApp"

Avoid storing secrets unencrypted in the registry with SaveSetting; it’s convenient for UI preferences but not for passwords or machine‑wide configuration. If keys still can’t be found, open RegEdit as the same user that runs the VB code or check the appropriate user SID under HKEY_USERS. (learn.microsoft.com)

Recommended Answers

All 3 Replies

what did you want to do?

i want to find the exact location of the registry entry that the savesetting function is saving in my computer..

i want to find the exact location of the registry entry that the savesetting function is saving in my computer..

This is the path :-
My Computer\HKEY_CURRENT_USER\Software\VB and VBA Program Settings

as you are saving the value in "Project", "Options", "Auth" ,
now expand the node VB and VBA Program Settings and you will see a key created with name Project. expand this also and you will see a child key created with name Options. now click this and you will see some values appeared in the right pane. there you can see the value Auth.

still more questions??? just post right in..
ok...

regards
Shouvik

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.