You are here

Handling a Folder in %APPDATA%

2 posts / 0 new
Last post
Drazick
Offline
Last seen: 21 hours 24 min ago
Joined: 2010-09-06 06:36
Handling a Folder in %APPDATA%

I am trying to convert an application into a portable form.

The application only creates a folder named AppName in %APPDATA%.
My question is, what's the proper way to configure the launcher?

I thought about something like:


[DirectoriesMove]
AppName=%APPDATA%\AppName

My question is, how it handles the case %APPDATA%\AppName already defined?
From documentation I get it is first coped and kept as backup and then the local copy is copied.

Then I wonder how it handles crashes.
Namely let's say I run the application on a computer with a pre installed version.
The computer crashes and then the user ruin the pre installed version of the application. The application will find the portable app settings on the path, right?

Anything more advanced to handle such simple case?

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 7 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Automatic

It automatically renames the existing folder in APPDATA to AppName.BackupByAppNamePortable as it launches. As it exits, it renames it back. If the app crashes, the launcher will work as usual and rename it back. If your computer crashes or you shutdown without closing, it's as if the launcher crashed. It will clean up the next time you launch it, fixing the local version.

We've debated a leave-behind on the local machine to handle all app cleanups in the event of improper shutdowns. It would likely be a process to handle all apps and part of the platform to make it cohesive and consistent (plus 75% of our users only use the platform).

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

Log in or register to post comments