Getting Data from Registry using Access 2 
Author Message
 Getting Data from Registry using Access 2

I have an application that used to get the location of winword.exe from the
win.ini file (on a 3.11 operating system). We have now upgraded to NT 4.0
operating system and the information I need to get is in the registry. Is
there a way to read the registry file from within Access 2.0??  I have found
several 32 bit api calls that do this sort of thing but I cannot locate a 16
bit api to do the same thing.  Any suggestion on how to deal with this
situtation would be greatly appreciated!!

Karin Ellis

Information Technology Specialist
Minnesota Department of Commerce
St. Paul, MN



Tue, 08 Aug 2000 03:00:00 GMT  
 Getting Data from Registry using Access 2

Hi Karin,

I know of no way to directly access the Registry using 2.0. You could
write a program in VB 4/5 or Access 95/97 to read the Registry info &
place the info into an .INI file, which you could then read from
Access 2.0. Best of luck to you.

Quote:

>I have an application that used to get the location of winword.exe from the
>win.ini file (on a 3.11 operating system). We have now upgraded to NT 4.0
>operating system and the information I need to get is in the registry. Is
>there a way to read the registry file from within Access 2.0??  I have found
>several 32 bit api calls that do this sort of thing but I cannot locate a 16
>bit api to do the same thing.  Any suggestion on how to deal with this
>situtation would be greatly appreciated!!

>Karin Ellis

>Information Technology Specialist
>Minnesota Department of Commerce
>St. Paul, MN

Brad L. Wartman
B & W Consulting Services
6049 NE Davis
Portland, OR 97213

Phone: (503) 231-4785
Fax:   (503) 231-6003

Compuserve: 72600,454



Thu, 10 Aug 2000 03:00:00 GMT  
 Getting Data from Registry using Access 2

Don't know if these will work in NT, but the 16 bit API calls for reading
the Win32s registry are as follows.
You may have to put the full path to shell.dll.

Declare Function RegEnumKey Lib "shell.dll" (ByVal hKey As Long, ByVal
dwindex As Long, ByVal lpname As String, ByVal cbname As Long) As Long
Declare Function RegOpenKey Lib "shell.dll" (ByVal hKey As Long, ByVal
lpszSubKey As String, lphkResult As Long) As Long
Declare Function RegCreateKey Lib "shell.dll" (ByVal hKey As Long, ByVal
lpSubKey As String, phkResult As Long) As Long
Declare Function RegDeleteKey Lib "shell.dll" (ByVal hKey As Long, ByVal
lpSubKey As String) As Long
Declare Function RegCloseKey Lib "shell.dll" (ByVal hKey As Long) As Long
Declare Function RegQueryValue Lib "shell.dll" (ByVal hKey As Long, ByVal
lpSubKey As String, ByVal lpValue As String, lpcbValue As Long) As Long
Declare Function RegSetValue Lib "shell.dll" (ByVal hKey As Long, ByVal
lpSubKey As String, ByVal dwType As Long, ByVal lpData As String, ByVal
cbData As Long) As Long

Quote:

>I have an application that used to get the location of winword.exe from the
>win.ini file (on a 3.11 operating system). We have now upgraded to NT 4.0
>operating system and the information I need to get is in the registry. Is
>there a way to read the registry file from within Access 2.0??  I have
found
>several 32 bit api calls that do this sort of thing but I cannot locate a
16
>bit api to do the same thing.  Any suggestion on how to deal with this
>situtation would be greatly appreciated!!

>Karin Ellis

>Information Technology Specialist
>Minnesota Department of Commerce
>St. Paul, MN



Fri, 11 Aug 2000 03:00:00 GMT  
 Getting Data from Registry using Access 2

Quote:

>Don't know if these will work in NT, but the 16 bit API calls for reading
>the Win32s registry are as follows.
>You may have to put the full path to shell.dll.

>Declare Function RegEnumKey Lib "shell.dll" (ByVal hKey As Long, ByVal
>dwindex As Long, ByVal lpname As String, ByVal cbname As Long) As Long

[Snip]

Karin/Terry:

Unfortunately the 16 bit api calls Terry listed, although they do read and
write to the registry generally won't work in today's registry environment.
That's because the old 16 bit registry api's really treated all reg values
as keys themselves.  So you can't for instance read any of the registry
values below the "default" entry for a key using the 16 bit registry apis.
If you really need to go the route of reading the registry, you have to use
the 32 bit api's and a thunking dll to call from Access 2 to the 32 bit api.
You can find a thunking dll called "call32.dll" posted on our web site in
the free files area with which you can have Access 2 call the 32 bit
registry api's (and pretty much any other 32 bit api for that matter.)

If OTOH, you are simply trying to open Word from Access 2, then forget the
registry/shell approach, and open word using an Object approach by using
CreateObject(Word.Application) for Word 97, or CreateObject(Word.Basic) for
Word 6/95, and let windows read the registry and find and open Word.

HTH

Steve Arbaugh
ATTAC Consulting Group
web: http://ourworld.compuserve.com/homepages/attac-cg/acgsoft.htm
To reply, remove ~ and nospm from address



Fri, 18 Aug 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Getting data from security-enabled Access 2 to Excel 7 using DAO

2. Help - Simply Getting Data from Extrenal Data Files (not from Access Data Base)

3. Using VB5 to import data to access without using the Data control

4. Getting data from Access tables with VB6 without Access

5. Storing encrypted data in the registry using VB and TwoFish

6. Accessing registry data

7. Access Registry Binary Data

8. Retrieving data from multiple servers using a common data access component

9. Accessing data stored in the registry.

10. Not getting data using WHERE clause between table and recordset

11. Getting Data from UML Shapes using VBA

12. Getting SQL Data Into Word Using a Web Page

 

 
Powered by phpBB® Forum Software