INI Files

Got a problem you cannot solve? Try here.
Post Reply
rnh63
Posts: 6
Joined: Thu May 13, 2010 2:06 am

INI Files

Post 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.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: INI Files

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
rnh63
Posts: 6
Joined: Thu May 13, 2010 2:06 am

Re: INI Files

Post by rnh63 »

Hi Michael,
Thanks for the suggestion. I think that should work okay. :wink:
Post Reply