• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 496
  • Last Modified:

To find an INI file from Access

Hello,

I have a simple code in my Access DB to get or write to the ini file.
-----------------------------------------------------------------------------------------
Function GetIniEntrySettings(strSection As String, strEntry As String) As String

    GetIniEntrySettings = GetSetting("Sample", strSection, strEntry, "")
   
End Function
---------------------------------------------------------------------------------------------

But I don't know how to find that INI file! How can I locate that INI file?
I didn't create that DB and need to find that ini file. Code doesn't define or declare
any INI files. Is there some settings in the MDB file I can check?
Is there a defualt folder that ini files sit?

So to summarize - how can I find the ini file that my code talks to.
0
LenkaL
Asked:
LenkaL
1 Solution
 
jerryb30Commented:
What ini file?  What program?  What version of Access?  What OS?

Most of your default settings, as would be set in Tools, Options, would now be stored in your system registry.  
0
 
ragoranCommented:
GetSetting queries the Windows registry, not an INI file.
0
 
harfangCommented:
In Access 2002, ini files are used only on MacOS. I don't know where to look for it, but here are some pointers:

    ? DBEngine.IniPath
    Software\Microsoft\Office\11.0\Access\Jet\4.0

This shows the registry path on Windows. Perhaps it will show the path to the ini file on a MacIntosh? You also have:

    ? SysCmd(acSysCmdIniFile)
    msacc30.ini

This could also be a clue. If you are looking for custom ini files, the switch /profile superseded the old /ini switch. But again, is that only Windows?

Finally, it's probably that the function you show is merely a wrapper added when upgrading from Access 97 or earlier. Have you looked into the registry under this key:

HKEY_CURRENT_USER\Software\VB and VBA Program Settings\Sample\...

(°v°)
0
 
LenkaLAuthor Commented:
>>GetSetting queries the Windows registry, not an INI file.

That is close to what is happening. I did find those settings in registry on another machine.
How can I copy those settings onto my machine?

When GetSettings runs on my machine it obviously returns nothing.
Is there some script I can write just to copy those settings?
0
 
harfangCommented:
locate the "Sample" key and export it to a *.reg file (only that branch). Copy that file to your computer and double-click it.

Cheers!
(°v°)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now