Re: Windows Registry



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/default.asp?url=/library/en-us/modcore/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


"Friedi" <Friedi@xxxxxxxxxx> wrote in message 
news:CFCC9166-E9D7-4F63-8AD3-34C50A9345F7@xxxxxxxxxxxxxxxx
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
-- 
Friedi 


.



Relevant Pages

  • Re: Get Words cursor coordinates on the screen
    ... Since the search hit is selected, I could use the insertion point's position on the screen as reference, but I don't know how to do that in VBA or using an API call. ... It might be possible to do using the Windows API, ... Make sure you clearly state you are using VBA in Word - that group deals with VB6, but it is sufficiently similar to VBA that they may be able to help, but it will assist them if they know what they are dealing with. ... However, it might prove not to be possible at all - Word's windows are pretty weird and non-standard beasts, and trying to hook them by normal Windows techniques often has undesirable side effects. ...
    (microsoft.public.word.vba.userforms)
  • Re: Windows Registry
    ... Is this to program with VBA 'getsetting' or with an API function? ... > the registry reserved for VBA applications. ... you must use the Windows API. ...
    (microsoft.public.windowsxp.general)
  • Re: Ping John Larkin
    ... suppose we'll have to use Windows or Linux at some point. ... Don't know how VBA would fare there. ... severe licensing restrictions, meaning it cannot be used with all VBA ... In DOS we jsut wrote directly to the UART:) Now the UART is hidden ...
    (sci.electronics.design)
  • Re: Windows Registry
    ... Microsoft MVP [Windows XP Shell/User] ... How To Use the Registry API to Save and Retrieve Setting: ... Visual Basic for Applications (VBA) - MSDN Forums: ...
    (microsoft.public.windowsxp.general)
  • Re: Ping John Larkin
    ... suppose we'll have to use Windows or Linux at some point. ... VBA has lots of potential but to make things actually work is tough for me. ... in DOS it was fairly easy. ... In DOS we jsut wrote directly to the UART:) Now the UART is hidden ...
    (sci.electronics.design)

Loading