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!

Getsetting function does not work

Status
Not open for further replies.

qdtb

Technical User
Mar 14, 2002
12
PR
Hi
I want to get the compuetr name from the registry. In my computer that has Windows XP home edition the appname is ComputerName, the option is ActiveComputerName and the key is ComputerName.

When I insert the function
Dim cname as string
cname=GetSetting("ComputerName", "ActiveComputerName", "Computername")

the string cname is not getting any value

which could be my problem??. I really need to obtain the computer name

Thanks
 
It is working as described in Visual Basic Concepts:
"Visual Basic provides a standard registry location for storing program information for applications created in Visual Basic:

HKEY_CURRENT_USER\Software\VB and VBA Program Settings\appname\section\key"

GettSettings only supplies "appname\section\key".

You can not use GetSettings to access outside of
HKEY_CURRENT_USER\Software\VB and VBA Program Settings
Generate Forms/Controls Resizing/Tabbing Class
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top