You are here

Saving of the settings in a file *.dat

10 posts / 0 new
Last post
tapsklaps
Offline
Last seen: 5 years 6 months ago
Developer
Joined: 2010-10-17 08:11
Saving of the settings in a file *.dat

Assuming that an app saves its settings in a file *.dat. Especially may be saved the changes with respect to drive-letters and languages in this file *.dat. Because of the difficulties regarding the access to this *.dat file, there are now basically 2 options.

  1. Removing of the file *.dat
  2. Firstly I can remove this file *.dat. Afterwards I look, where the app now stores its settings. Now I start the development of a portable version of the app.

  3. Access to the file *.dat
  4. Under the assumption of a possible access to the file *.dat I search for another kind of development of a portable version of the app.

My main problem is now, if here exists a way of the development of a portable version in the case of #2. And if yes, how must I perform the access to this file *.dat?

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 21 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Issue

The question is, what is the issue. If the issue is that the file name changes, you can figure it out in custom.nsh and save it to an environment variable, then handle it in launcher.ini. If the issue is that the .dat is a binary format and can't be dealt with using launcher.ini, then you'll need to figure out how it's handled and deal with it in custom code or ask for a patch for the app.

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

tapsklaps
Offline
Last seen: 5 years 6 months ago
Developer
Joined: 2010-10-17 08:11
probably a binary format

The main issue is the fact, that's impossible to read the content of the *.dat file with an usual editor. Accordingly I must remove this file as explained under #1. But in this case it's necessary, that I must figure out all possible changes caused by this app. This seems to be very difficult, because I must check all possible menus items of this app, which can influence the portability negative. Therefore it would be a better idea to ask the publisher for a patch.

Or exist a possibility to convert such a *.dat file. In a german article was explained, that some *.dat files can be converted by exchanging the extension "dat" through "doc".

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 21 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
DAT

dat files are generally in a unique format (non-standard, every app is different). They can't be converted to something like INI, REG, SQLITE, CONFIG, etc using standard tools. Open it in Notepad++ and you'll likely find it to be a proprietary binary format.

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

tapsklaps
Offline
Last seen: 5 years 6 months ago
Developer
Joined: 2010-10-17 08:11
conclusion

Because it's probably a proprietary binary format, I can therefore use only the solution described under #1.

But the program, which stores its settings in this *.dat file, is native portable. Accordingly I can also leave this *.dat file in the base app folder. The only problem in this case is the automatic language switching in the PA.com menu and the change of drive-letters.

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 5 months 1 week ago
DeveloperModerator
Joined: 2008-07-24 18:46
Figure out how

As a result of having settings stored in that file, you'll likely want to figure out how the settings are saved there, and do a conversion of the specific portions if possible.

Source code can sometimes help you figure out how the settings are being saved to that file.

There are a few apps available that do custom coding like that. Off hand I don't know which ones.

Of course, if the app is not open source, it'll be harder to find out how the file is being saved, and would require contacting the publisher, leading back to asking for a patch to use a more readable format.

tapsklaps
Offline
Last seen: 5 years 6 months ago
Developer
Joined: 2010-10-17 08:11
Ask for a patch

Unfortunately it's not an open source app (only freeware). Accordingly it would be the best idea for contacting the publisher regarding the offer of a more readable format.

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 5 months 1 week ago
DeveloperModerator
Joined: 2008-07-24 18:46
Right

That's probably the best idea. Also note that just removing that file won't force the app to save it's settings somewhere else, it'll likely just be recreated.

tapsklaps
Offline
Last seen: 5 years 6 months ago
Developer
Joined: 2010-10-17 08:11
Exception

Though in most cases it's really so, that the removed settings file was just recreated, there seem to be an exception in that special case.

tapsklaps
Offline
Last seen: 5 years 6 months ago
Developer
Joined: 2010-10-17 08:11
negative answer of the publisher

Meanwhile I've contacted the publisher. Unfortunately he have reported me, that there are currently no plans to change the way the *.dat file is written to or provide further external access to it.

Log in or register to post comments