PDA

View Full Version : stopping Uninstall from removing a file



robertsc
08-20-2003, 04:58 AM
Hi,
I have a problem, that is causing me to scratch my head.

I have a product in the field that is in need of an upgrade.

The Setup script contains a file myapp.ini

When I run the new setup files I need it to uninstall the old app and then intall the new version, how ever I need it to leave the myapp.ini file behind, as it contains lots of user specific info.

Does anybody know how I can achieve this.

Any ideas will be very gratefully received

Chris

chris.roberts@optima-ws.com

ursvenky
08-20-2003, 05:11 AM
May be there is a better way than the following.

One idea is
Before uninstalling the previous version rename the file "myapp.ini" to some thing else ex "xy.ini" ( Concatanate ur productname to this to make this unique" ) using the following API

RenamFile( szSrcFile, szTargetDir);

then after upgrading Just rename the file back to reflect the "myapp.ini"

Hope this helps

All the best

robertsc
08-20-2003, 05:47 AM
Works a treat :D

Thank you very much

Chris