![]() |
Automatic Uninstall?
Hi,
let's say I've got a folder with savegames that I'm shipping for a game, that I want to install. Now the user plays the game and also creates some savegames (into the same folder) When uninstalling, I want the uninstaller to remove the savegames what were shipped with the game, but not the ones that the user created. How do I do that? Regards, Nils |
First of all "(into the same folder)" saving is NOT a good way to store data on your OS. It should be in:
\Documents and Settings\{PLAYUSER}\Application Data\{YOURORGINAZATION}\{YOURAPP}\Savegame where the {} values are ofcourse variables. Then it is also easy to maintain, remove just this folder. see documentation about "RMDir" how to do that. |
This is exactly the path we're using. An I know RMDir, but the shipped savegames are installed in exactly the folder you mention, and the user is saving his savegames there, too. So is there a way to remove only the files that have been installed by the installer or isn't this possible?
|
The only real way I can see to do this is for your installer to record what it installed (including the initial savedgame files).
This is what is commonly called an 'installer log'. The uninstaller simply removes anything that is in the log. The log might also include registry changes and shortcuts added too. This is how most modern installers handle your problem. It is also why sometimes you see 'some items need to removed manually' messages when uninstalling. The uninstaller is basically saying "Hey! There is some data here that I didn't put there. I guess it must be yours, you decide what to do with it, I'll leave it alone!". This does mean that your uninstaller cannot count on being able to remove the data directory it created, unless after removing the information it put there, it is empty. These same ideas apply equally to registry information and shortcuts. Duncan |
| All times are GMT. The time now is 05:48. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.