To find an INI file from Access

Posted on 2007-10-17
Last Modified: 2013-11-29

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.
Question by:LenkaL
    LVL 28

    Expert Comment

    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.  
    LVL 14

    Expert Comment

    GetSetting queries the Windows registry, not an INI file.
    LVL 58

    Expert Comment

    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

    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)

    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\...


    Author Comment

    >>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?
    LVL 58

    Accepted Solution

    locate the "Sample" key and export it to a *.reg file (only that branch). Copy that file to your computer and double-click it.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
    Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now