Discussion:
Registry
(too old to reply)
John
21 years ago
Permalink
Hi
I have posted this again because I am still having problems.

I wonder if some one could please help me make a reg key program.
I am ok with the basic stuff but here is the key i want to make.
Its actually the UID and the PWD i want to edit.


[HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\sld]
"Driver"="c:\\siebel\\bin\\wod50t.dll"
"UID"="7CG"
"PWD"="7CG"
"Description"="Siebel Local Database"
"Start"="C:\\SIEBEL\\BIN\\dbeng50.exe"
"DatabaseFile"="C:\\siebel\\local\\sse_data.dbf"
"DatabaseName"="sse_data"
"AutoStop"="yes"


Can some one please show me how to edit thoses particular strings?

Thanks
Mike D Sutton
21 years ago
Permalink
...
Grab the Registry class off vbAccelerator.com then you can just use the ValueEx() property:

'***
Dim MyReg As cRegistry

Set MyReg = New cRegistry
MyReg.ValueEx(HKEY_CURRENT_USER, "Software\ODBC\ODBC.INI\sld", _
"Driver", REG_SZ, "") = "c:\\siebel\\bin\\wod50t.dll" ' Set registry key
Set MyReg = Nothing
'***

If you want to query the current value then just use the Property Get:

'***
Debug.Print MyReg.ValueEx(HKEY_CURRENT_USER, _
"Software\ODBC\ODBC.INI\sld", "Driver", REG_SZ, "[ Undefined ]")
'***

Hope this helps,

Mike


- Microsoft Visual Basic MVP -
E-Mail: ***@mvps.org
WWW: Http://EDais.mvps.org/
John
21 years ago
Permalink
OK got that bit but how to i modify this bit

"UID"="7CG"
"PWD"="7CG"
...
Mike D Sutton
21 years ago
Permalink
Post by John
OK got that bit but how to i modify this bit
"UID"="7CG"
"PWD"="7CG"
Just modify the source I posted previously and put those values in in place of the ones currently there..
Hope this helps,

Mike


- Microsoft Visual Basic MVP -
E-Mail: ***@mvps.org
WWW: Http://EDais.mvps.org/

Continue reading on narkive:
Loading...