john
Wed Jan 21 14:58:38 CST 2004
Sure is.
Use WMI and the system registry provider.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/system_registry_provider.asp
Code to read a string value into sString may look something like:-
(Watch for word wrap)
'***********************************************
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_CLASSES_ROOT = &H80000000
Const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_USERS = &H80000003
Const HKEY_CURRENT_CONFIG = &H80000005
Dim oRegistry, sKey, sValue, sString
'** Where to look
sKey = "Software\Microsoft\DataAccess"
sValue = "Version"
'** Get local registry from WMI and read string value.
Set oRegistry = GetObject("winmgmts:root\default:StdRegProv")
RetVal = oRegistry.GetStringValue(HKEY_LOCAL_MACHINE, sKey, sValue,
sString)
msgBox "Value of sString = " & sString
set oRegistry = Nothing
'*******************************************************
But, don't quote me on that....
Cheers
John
Dany K <anonymous@discussions.microsoft.com> wrote in message news:<1CAC8282-BBB8-4068-9A40-590D5B4BA558@microsoft.com>...
> Hello,
>
> I was wondering if it's possible to use VBscript as a means to get a value from the registry and if not, how it can be done using VB6.
>
> Thanks a lot,
>
> -Dany