Windows Registry

G

Guest

Using the 'GetSetting' Function in VBA (We work with Access 2002/2003) we
only get info from the Windows Registry within the section 'VB and VBA
Program Settings'.
We would like to get info of a setting - by means of VBA Code- of the actual
path of an Acrobat Reader installed on a computer. On my machine for
example,the actual path is:
c:\Program Files\Adobe\Acrobat 7.0\Reader. On my 2nd machine, Acrobat is
installed on D: and is version 6.
How do we have to program with VBA to get this information out of the
Windows Registry?

Can anybody help?
Thanks
Friedi
 
R

Ramesh, MS-MVP

Get the Path from here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\AcroRd32.exe

Why Use VBA to Call the Windows API?:
http://msdn.microsoft.com/library/d...dcore/html/deovrwhyusevbatocallwindowsapi.asp

[Excerpt]
For example, VBA provides functions that read from and write to a portion of
the registry reserved for VBA applications. You can use these functions -
GetSetting, GetAllSettings, SaveSetting, and DeleteSetting - to maintain
information about your application between sessions. However, these
functions permit you to work with only one subkey in the registry, namely
the \HKEY_CURRENT_USER\Software\VB and VBA Program Settings subkey. If you
want to store or to retrieve information from any other part of the
registry, you must use the Windows API.

[/Excerpt]


How To Use the Registry API to Save and Retrieve Setting:
http://support.microsoft.com/kb/q145679/

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Using the 'GetSetting' Function in VBA (We work with Access 2002/2003) we
only get info from the Windows Registry within the section 'VB and VBA
Program Settings'.
We would like to get info of a setting - by means of VBA Code- of the actual
path of an Acrobat Reader installed on a computer. On my machine for
example,the actual path is:
c:\Program Files\Adobe\Acrobat 7.0\Reader. On my 2nd machine, Acrobat is
installed on D: and is version 6.
How do we have to program with VBA to get this information out of the
Windows Registry?

Can anybody help?
Thanks
Friedi
 
G

Guest

Thank you very much for your reply. I am not familiar with API and think
with the articles you pointed out I have a lot of study to do.

Just please precise what you mean me to do :

Quote ' Get the Path from here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\AcroRd32.exe '
End Quote

Is this to program with VBA 'getsetting' or with an API function?

Thanks
Friedi
--
Friedi


Ramesh said:
Get the Path from here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\AcroRd32.exe

Why Use VBA to Call the Windows API?:
http://msdn.microsoft.com/library/d...dcore/html/deovrwhyusevbatocallwindowsapi.asp

[Excerpt]
For example, VBA provides functions that read from and write to a portion of
the registry reserved for VBA applications. You can use these functions -
GetSetting, GetAllSettings, SaveSetting, and DeleteSetting - to maintain
information about your application between sessions. However, these
functions permit you to work with only one subkey in the registry, namely
the \HKEY_CURRENT_USER\Software\VB and VBA Program Settings subkey. If you
want to store or to retrieve information from any other part of the
registry, you must use the Windows API.

[/Excerpt]


How To Use the Registry API to Save and Retrieve Setting:
http://support.microsoft.com/kb/q145679/

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Using the 'GetSetting' Function in VBA (We work with Access 2002/2003) we
only get info from the Windows Registry within the section 'VB and VBA
Program Settings'.
We would like to get info of a setting - by means of VBA Code- of the actual
path of an Acrobat Reader installed on a computer. On my machine for
example,the actual path is:
c:\Program Files\Adobe\Acrobat 7.0\Reader. On my 2nd machine, Acrobat is
installed on D: and is version 6.
How do we have to program with VBA to get this information out of the
Windows Registry?

Can anybody help?
Thanks
Friedi
 
R

Ramesh, MS-MVP

The "SUMMARY" section in the following article explains you everything.

How To Use the Registry API to Save and Retrieve Setting:
http://support.microsoft.com/kb/q145679/

- - - -
Although Visual Basic includes the SaveSetting and GetSetting functions to
save and retrieve information from the registry, these functions only
operate on a specific section of the registry, the Visual Basic and VBA
Program Settings of the HKEY_CURRENT_USER root key.

This article outlines the use of 32-bit Windows API functions, which can be
used to set and retrieve values from anywhere in the registry. The topics
and function references in this article can be generalized to program the
16-bit registry.
- - - -

Whereas the Adobe Acrobat installation path can be found in the following
registry location, which is outside the limits of "GetSetting" function.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\AcroRd32.exe]
The (default) contains the application path.

See also:

Visual Basic for Applications (VBA) - MSDN Forums:
http://forums.microsoft.com/msdn/showforum.aspx?forumid=74&siteid=1

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Thank you very much for your reply. I am not familiar with API and think
with the articles you pointed out I have a lot of study to do.

Just please precise what you mean me to do :

Quote ' Get the Path from here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\AcroRd32.exe '
End Quote

Is this to program with VBA 'getsetting' or with an API function?

Thanks
Friedi
--
Friedi


Ramesh said:
Get the Path from here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\AcroRd32.exe

Why Use VBA to Call the Windows API?:
http://msdn.microsoft.com/library/d...dcore/html/deovrwhyusevbatocallwindowsapi.asp

[Excerpt]
For example, VBA provides functions that read from and write to a portion
of
the registry reserved for VBA applications. You can use these functions -
GetSetting, GetAllSettings, SaveSetting, and DeleteSetting - to maintain
information about your application between sessions. However, these
functions permit you to work with only one subkey in the registry, namely
the \HKEY_CURRENT_USER\Software\VB and VBA Program Settings subkey. If you
want to store or to retrieve information from any other part of the
registry, you must use the Windows API.

[/Excerpt]


How To Use the Registry API to Save and Retrieve Setting:
http://support.microsoft.com/kb/q145679/

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Using the 'GetSetting' Function in VBA (We work with Access 2002/2003) we
only get info from the Windows Registry within the section 'VB and VBA
Program Settings'.
We would like to get info of a setting - by means of VBA Code- of the
actual
path of an Acrobat Reader installed on a computer. On my machine for
example,the actual path is:
c:\Program Files\Adobe\Acrobat 7.0\Reader. On my 2nd machine, Acrobat is
installed on D: and is version 6.
How do we have to program with VBA to get this information out of the
Windows Registry?

Can anybody help?
Thanks
Friedi
 
R

Ramesh, MS-MVP

Example:
http://groups.google.com/group/comp.databases.ms-access/msg/3ab1868f2a456d35

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


The "SUMMARY" section in the following article explains you everything.

How To Use the Registry API to Save and Retrieve Setting:
http://support.microsoft.com/kb/q145679/

- - - -
Although Visual Basic includes the SaveSetting and GetSetting functions to
save and retrieve information from the registry, these functions only
operate on a specific section of the registry, the Visual Basic and VBA
Program Settings of the HKEY_CURRENT_USER root key.

This article outlines the use of 32-bit Windows API functions, which can be
used to set and retrieve values from anywhere in the registry. The topics
and function references in this article can be generalized to program the
16-bit registry.
- - - -

Whereas the Adobe Acrobat installation path can be found in the following
registry location, which is outside the limits of "GetSetting" function.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\AcroRd32.exe]
The (default) contains the application path.

See also:

Visual Basic for Applications (VBA) - MSDN Forums:
http://forums.microsoft.com/msdn/showforum.aspx?forumid=74&siteid=1

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Thank you very much for your reply. I am not familiar with API and think
with the articles you pointed out I have a lot of study to do.

Just please precise what you mean me to do :

Quote ' Get the Path from here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\AcroRd32.exe '
End Quote

Is this to program with VBA 'getsetting' or with an API function?

Thanks
Friedi
--
Friedi


Ramesh said:
Get the Path from here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\AcroRd32.exe

Why Use VBA to Call the Windows API?:
http://msdn.microsoft.com/library/d...dcore/html/deovrwhyusevbatocallwindowsapi.asp

[Excerpt]
For example, VBA provides functions that read from and write to a portion
of
the registry reserved for VBA applications. You can use these functions -
GetSetting, GetAllSettings, SaveSetting, and DeleteSetting - to maintain
information about your application between sessions. However, these
functions permit you to work with only one subkey in the registry, namely
the \HKEY_CURRENT_USER\Software\VB and VBA Program Settings subkey. If you
want to store or to retrieve information from any other part of the
registry, you must use the Windows API.

[/Excerpt]


How To Use the Registry API to Save and Retrieve Setting:
http://support.microsoft.com/kb/q145679/

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Using the 'GetSetting' Function in VBA (We work with Access 2002/2003) we
only get info from the Windows Registry within the section 'VB and VBA
Program Settings'.
We would like to get info of a setting - by means of VBA Code- of the
actual
path of an Acrobat Reader installed on a computer. On my machine for
example,the actual path is:
c:\Program Files\Adobe\Acrobat 7.0\Reader. On my 2nd machine, Acrobat is
installed on D: and is version 6.
How do we have to program with VBA to get this information out of the
Windows Registry?

Can anybody help?
Thanks
Friedi
 
D

David Candy

Why would you need that infomation. The thing you want to read makes it possible to shell just like this. As windows will do it for you why are you doinfg it too.

AcroRd32 "c:\path to pdf\file.pdf"
 
G

Guest

Thank youy very much for all the links you gave to me
--
Friedi


Ramesh said:
Example:
http://groups.google.com/group/comp.databases.ms-access/msg/3ab1868f2a456d35

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


The "SUMMARY" section in the following article explains you everything.

How To Use the Registry API to Save and Retrieve Setting:
http://support.microsoft.com/kb/q145679/

- - - -
Although Visual Basic includes the SaveSetting and GetSetting functions to
save and retrieve information from the registry, these functions only
operate on a specific section of the registry, the Visual Basic and VBA
Program Settings of the HKEY_CURRENT_USER root key.

This article outlines the use of 32-bit Windows API functions, which can be
used to set and retrieve values from anywhere in the registry. The topics
and function references in this article can be generalized to program the
16-bit registry.
- - - -

Whereas the Adobe Acrobat installation path can be found in the following
registry location, which is outside the limits of "GetSetting" function.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\AcroRd32.exe]
The (default) contains the application path.

See also:

Visual Basic for Applications (VBA) - MSDN Forums:
http://forums.microsoft.com/msdn/showforum.aspx?forumid=74&siteid=1

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Thank you very much for your reply. I am not familiar with API and think
with the articles you pointed out I have a lot of study to do.

Just please precise what you mean me to do :

Quote ' Get the Path from here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\AcroRd32.exe '
End Quote

Is this to program with VBA 'getsetting' or with an API function?

Thanks
Friedi
--
Friedi


Ramesh said:
Get the Path from here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\AcroRd32.exe

Why Use VBA to Call the Windows API?:
http://msdn.microsoft.com/library/d...dcore/html/deovrwhyusevbatocallwindowsapi.asp

[Excerpt]
For example, VBA provides functions that read from and write to a portion
of
the registry reserved for VBA applications. You can use these functions -
GetSetting, GetAllSettings, SaveSetting, and DeleteSetting - to maintain
information about your application between sessions. However, these
functions permit you to work with only one subkey in the registry, namely
the \HKEY_CURRENT_USER\Software\VB and VBA Program Settings subkey. If you
want to store or to retrieve information from any other part of the
registry, you must use the Windows API.

[/Excerpt]


How To Use the Registry API to Save and Retrieve Setting:
http://support.microsoft.com/kb/q145679/

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Using the 'GetSetting' Function in VBA (We work with Access 2002/2003) we
only get info from the Windows Registry within the section 'VB and VBA
Program Settings'.
We would like to get info of a setting - by means of VBA Code- of the
actual
path of an Acrobat Reader installed on a computer. On my machine for
example,the actual path is:
c:\Program Files\Adobe\Acrobat 7.0\Reader. On my 2nd machine, Acrobat is
installed on D: and is version 6.
How do we have to program with VBA to get this information out of the
Windows Registry?

Can anybody help?
Thanks
Friedi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top