samrocketman/ekeyfinder

User-edited file in addition to official file

Opened this issue · 5 comments

scriptdaemon wrote:

Also, another thing I wanted to discuss with you. Since our apps should backup user data, I was curious if you could have separate files for software registry keys. One file for user additions, and the other still being the officially updated file. As the user can add his or her own programs into the file, he or she might want to have that data backed up with the rest of his or her settings. In doing this, whenever there is an officially updated key file, the user added software would be deleted.

From http://portableapps.com/node/26332#post-168535

I'll figure out an effective way to implement user defined software keys. I can see this being a bother. Although hopefully they would update the community version (anyone can edit it) because that gets converted to the official version.
http://sourceforge.net/apps/mediawiki/keyfinder/index.php?title=Keyfinde...

Nonetheless I'll figure out what I want the alternate file to be named. Maybe make a setting so the name can be defined and changed by the user by way of a relative path (for flash drives).

I was also thinking of creating a setting called

[settings]
config=PATH_TO_CONFIG

Where PATH_TO_CONFIG would be a user defined path to the config settings. That way the user defined settings for keyfinder can be referenced to the Data path in portable apps. The paths within the settings would still remain relative to the executable of Keyfinder.

scriptdaemon wrote:

That way we can back up the user defined one and leave the official one alone.

Also, it would be nice to have a user defined config path. Though, wouldn't putting that in the settings file be redundant?

It wouldn't be redundant. The reason being keyfinder.ini (which would be located with keyfinder.exe) would refer to the actual keyfinder.ini where all the settings are. Example:

KeyfinderPortable\App\keyfinder\keyfinder.cfg
KeyfinderPortable\App\keyfinder\keyfinder.exe
KeyfinderPortable\App\keyfinder\keyfinder.ini
KeyfinderPortable\Data\settings\keyfinder.cfg
KeyfinderPortable\Data\settings\keyfinder.ini

KeyfinderPortable\App\keyfinder\keyfinder.ini would contain the following...

[Settings]
AlternateSettingsPath=..\..\Data\settings\keyfinder.ini

KeyfinderPortable\Data\settings\keyfinder.ini would contain the users settings:

[Settings]
LogFilePath=.\
Logging=0
CSVDelim=,
AppendTop=0
AutoSave=0
LoadHive=0
LogOverwrite=0
PrintKeys=0
SavePath=C:\Users\Sam\Desktop\
ReportsPath=
UserHivePath=
SoftwareHivePath=
UnstableUpdates=1
[AppListFont]
Font=MS Sans Serif,1,-16777208,8,0
[KeyListFont]
Font=MS Sans Serif,1,-16777208,8,1

I could also define an AlternateConfigPath setting where user defined settings could be. So KeyfinderPortable\Data\settings\keyfinder.cfg could be the user defined keyfinder.cfg and KeyfinderPortable\App\keyfinder\keyfinder.cfg can be the official version.

That way keyfinder.cfg and keyfinder.ini (the user customized settings and config) will be backed up by the PortableApps backup utility.

[Settings]
AlternateSettingsPath=..\..\Data\settings\keyfinder.ini

That is something that PA.C would define so the user would never actually mess with it. Its sole purpose would be to define a new path for settings. Basically in keyfinder.ini the application would look for AlternateSettingsPath to be defined. If it is not defined then it will behave normally.

That doesn't sound too bad of a plan. Tell me your thoughts.

scriptdaemon wrote:

So it would be more like a global settings file, while the user defined settings file is completely different. I see, that makes sense.

Hmm, how about a UserConfigPath (or similar) that would just have both the user defined .cfg file and the user defined .ini file? What reason would there be to keep them separate? EK should use the official .cfg file, and if the user defined .cfg file has anything in it, use that too.

I'll see if I can do that for the next Beta. I'll definitely have that before v0.2 Stable (which is I assume will be the first portable apps release).

That's when I'll have all the settings sorted out. I'll also have the product updates fully sorted out.

I want to add compatibility for reading Adobe CS2 to Adobe CS5. But since I use Gimp I don't have any of those products. If you know anyone who is willing to provide a reg file (or even do some testing for me) that would be great.

I already have algorithms for reading Adobe keys I just need the registry structure.

They don't have to know anything about Delphi but it wouldn't hurt if they knew a little bit about the Windows registry. We would chat over IRC or something like during testing.

edit: I just remembered why I did keyfinder.ini and keyfinder.cfg separate. If a user downloads the standalone version of keyfinder then I want them to be able to specify the user defined keyfinder.cfg which would be in the same location as keyfinder.exe. So that means keyfinder.cfg keyfinder.ini keyfinder.exe and userdefined_keyfinder.cfg would all be in the same folder in that instance. I'll still think about that Global settings path because that would be more convenient.

edit edit: I know what I'll do. I'll have that UserConfigPath and I'll have userdefined_keyfinder.cfg specified in the users' settings keyfinder.ini. That way it's a setting which would be backed up. Problem solved.