Page 1 of 1

INI Files

Posted: Wed May 26, 2010 6:27 am
by rnh63
Hi,
I am having a lot of trouble with INI files. My application modifys and adds a few keys to a few INI files during setup. I have marked these ini files as permanent and not to overwrite.

When I unistall my app, the uninstaller seems to remove the lines that it added to the INI files. My setup programs must retain the copies of the ini files as they contain database settings etc..., of database files that are also marked as permanent.

Is it possible to get the uninstaller to leave the ini files as they are when the uninstaller is run?

Thanks for your help.

Re: INI Files

Posted: Wed May 26, 2010 7:27 pm
by MichaelNesmith
You ought to be able to achieve this by making a copy of the INI before calling Apply Uninstall using Call DLL Function on kernel32.dll's CopyFileA, and then restoring the file after uninstallation.

Re: INI Files

Posted: Fri May 28, 2010 1:52 pm
by rnh63
Hi Michael,
Thanks for the suggestion. I think that should work okay. :wink: