Page 1 of 1

How to create/modify a inifile

Posted: Wed Jun 06, 2007 6:01 am
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

Posted: Sat Jun 09, 2007 12:48 pm
by jimo
Nothing attached.

This command works for me all the time.

Her is my code

Posted: Mon Jun 11, 2007 6:48 am
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?

Posted: Mon Jun 11, 2007 7:40 am
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.

Everyting works

Posted: Mon Jun 11, 2007 8:29 am
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