FoldingAtHome / fah-client-win-installer

Folding@home Desktop Client Windows Installer
6 stars 2 forks source link

Windows: Uninstall deletes data directory when a sub-directory of program directory #6

Closed jcoffland closed 1 year ago

jcoffland commented 9 years ago

Reported by @P5-133XL on 24 Jul 2010 21:31 UTC I had my data directory as a sub-directory of the folding directory. When I uninstalled, the data directory was gone, as well as the folding directory even though I specified that it not delete the data.

jcoffland commented 9 years ago

Comment by @jcoffland on 25 Jul 2010 23:09 UTC That is the expected behavior. The uninstaller just deletes the whole directory where the program files are installed. I suppose I could make a special case to detect if the data directory was put in the program directory, but I don't think this is a high priority as the defaults work.

jcoffland commented 9 years ago

Comment by @jcoffland on 30 Dec 2010 00:04 UTC I'm fixing this by issuing a warning that this will happen at install time if the data directory is a sub-directory of the install directory.

jcoffland commented 9 years ago

Comment by @jcoffland on 2 Jan 2011 14:34 UTC Resolved in v7.1.5.

jcoffland commented 9 years ago

Comment by @7im- on 11 Jan 2012 20:08 UTC I've seen several examples where the existing "fix" isn't preventing the bug from recurring. For recent example: http://foldingforum.org/viewtopic.php?p=203830#p203830

I'd like to see an active check for data files in the programs folder before simply deleting it. It's not hard to check for a file, and then present a message box.

jcoffland commented 9 years ago

Comment by @bb30994 on 11 Jan 2012 21:08 UTC Another way to deal with this is something in the uninstaller script like:

If {PATH_TO_SOFTWARE 'is substring of' PATH_TO_DATA} printf "Warning: Manual data backup req'd. Data will be lost if you proceed"

Another useful warning would be

IF {KEEP_DATA eq TRUE} printf "When reinstalling, data path should be ",PATH_TO_DATA

jcoffland commented 9 years ago

Comment by @bb30994 on 28 Jan 2013 13:59 UTC In one other case, the uninstaller started removing files not associated with FAH. After a '''long''' discussion, nobody could clearly identify the source of the problem. The directory structure doesn't match what's in the title, but SOMETHING caused it and it's serious enough to try to protect the User from dangerous data structures. See http://foldingforum.org/viewtopic.php?p=234617#p234617

The suggestion there is to drop the "\fahclient" subdirectory off the suggestions for ...Program files... and for %APPDATA% and then re-add that directory to anything entered in those fields so that the actual location does not change but a root directory will never be used.

Another suggestion is to refuse to accept structures which are sub-directories of the other entry.

jcoffland commented 9 years ago

Comment by @7im- on 20 Nov 2013 00:09 UTC This just happened again. The donor ignored the installer warning, and installed FAH to a Software folder on a 2nd drive. Unfortunately, he had MANY software programs installed to this folder, and FAH deleted THEM ALL!!!

[]https://foldingforum.org/viewtopic.php?f=61&t=25280[]

The uninstaller should not simply delete the entire folder. It should gracefully and surgically remove only the files that it installed.

Removing a whole drive is very Virus-like and not a good behavior.