ReadINIFile

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

ReadINIFile

Post by pgriffin » Wed Dec 20, 2006 11:10 pm

Here is the data I have in ODBC.INI

[ODBC 32 bit Data Sources]
demo.abcd.com=iSeries Access ODBC Driver (32 bit)
ProcessData=Microsoft Access Driver (*.mdb) (32 bit)
198.25.0.27=iSeries Access ODBC Driver (32 bit)
[demo.abcd.com]
Driver32=C:\WINDOWS\system32\cwbodbc.dll
[ProcessData]
Driver32=C:\WINDOWS\system32\odbcjt32.dll
[198.25.0.27]
Driver32=C:\WINDOWS\system32\cwbodbc.dll

I want to use ReadIniFile (I think) to get ONLY the MicroSoft Access DSN and show it in a Dialog drop-down.

I think for ReadIniFile you have to already know the entry name within the section name and, in my case, there is no way to know since this app will be installed on end-user systems (any end-user, not within my company)...

Looks to me like I will have to use ReadFile, then start parsing...

Am I correct?

something like

Readfile>ODBC.INI,res,RawINI
sep>RawINI,%crlf%,INIRec

then some Pos> lines to find the INIRec (or recs) which contain =Microsoft Access Driver
then sep> the INIRec at = to get the actual name or names.....

any better ideas?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts