How to create/modify a inifile

Got a problem you cannot solve? Try here.
Post Reply
jls
Posts: 26
Joined: Wed Jun 06, 2007 5:17 am
Location: Norway

How to create/modify a inifile

Post by jls »

I have attached a simple project where I want to modify a ini file, but it doesn't work.

Any idea what's wrong


Jørgen
jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Post by jimo »

Nothing attached.

This command works for me all the time.
Jim Oswell
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
jls
Posts: 26
Joined: Wed Jun 06, 2007 5:17 am
Location: Norway

Her is my code

Post by jls »

if Variable ADVERTISE Equals TRUE
Apply Advertised (get result into variable SUCCESS)
else
Apply Install (get result into variable SUCCESS)
if Variable SUCCESS not Equals ERROR
if Variable SUCCESS not Equals CANCEL
Call DLL Function $TARGETDIR$\\testdll.dll->CreateINI
Edit INI File $TARGETDIR$\\test.ini, [Section1] Value=$TARGETDIR$
Run Program $TARGETDIR$\\TestAppMan.exe "$TARGETDIR$" (WAIT)
Run Program $TARGETDIR$\\TestApp.exe "$TARGETDIR$" (WAIT)
end
end
end


The line
Edit INI File $TARGETDIR$\\test.ini, [Section1] Value=$TARGETDIR$
doesn't work.

Must test.ini exist in the setupfiles or can it be created by Edit INI File?
jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Post by jimo »

Edit INI FIle is a Purple command which means you must place it before Apply Install, you do not need the Call DLL to create the ini file, Edit INI file will create it for you if it does not exist.
Jim Oswell
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
jls
Posts: 26
Joined: Wed Jun 06, 2007 5:17 am
Location: Norway

Everyting works

Post by jls »

Now it works


Call DLL Function $TARGETDIR$\\testdll.dll->CreateINI
I added this to test how to create a ini file in a dll (it also works)


Jørgen
Post Reply