You are here

[answered]Prevention

7 posts / 0 new
Last post
vf2nsr
vf2nsr's picture
Offline
Last seen: 7 years 5 months ago
Developer
Joined: 2010-02-13 17:10
[answered]Prevention

How does one create an installer that will guarantee that no matter where a user chooses to save file to the files do not get removed during installation of a new build?

For instance if a user chooses to save files in the app folder, then during an update the files would be removed. How can a developer prevent this from occurring? We can set a default location BUT ultimately a user can choose to save information where ever they wish to. Seems like this is a problem? At least with an app I have currently. Or so it would seem. Is it truly possible to cover every possible location that a user MAY decide to save information to?

John T. Haller
John T. Haller's picture
Online
Last seen: 28 min 1 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
You don't

Users should never save to the app folder. The app should default to Documents or Data as a fallback.

Sometimes, the impossible can become possible, if you're awesome!

vf2nsr
vf2nsr's picture
Offline
Last seen: 7 years 5 months ago
Developer
Joined: 2010-02-13 17:10
agreed

So it is impossible to prevent loss of data if a user choose to go against convention?

“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss

John T. Haller
John T. Haller's picture
Online
Last seen: 28 min 1 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Very Rare

I've only see a user do this maybe twice before. It's completely counterintuitive. It's like saving something to Program Files (which will also generally cause your data to go bye bye). And there's a file with a warning in it right in the App directory.

Sometimes, the impossible can become possible, if you're awesome!

vf2nsr
vf2nsr's picture
Offline
Last seen: 7 years 5 months ago
Developer
Joined: 2010-02-13 17:10
Thanks

AS I expected, just trying to make sure I cover all bases on all my apps, did not want to be doing any thing htat was incorrect

“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss

Bart.S
Offline
Last seen: 7 months 2 weeks ago
Developer
Joined: 2008-07-23 07:56
installer.ini

[MainDirectories]
RemoveAppDirectory=false

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 8 years 9 months ago
Joined: 2007-04-15 21:08
But remember:

There is a reason why RemoveAppDirectory is true by default.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Log in or register to post comments