Log in

View Full Version : Where Should Application Settings be Stored?


Jason Dunn
01-10-2003, 12:07 AM
I'm putting on my <a href="http://www.pocketpcthoughts.com/forums/viewtopic.php?t=5381">Spb VP hat for a minute</a> because I have a question for you about how you think Pocket PC software products should work. Pocket PCs are very different than desktop PCs, especially when it comes to starting over. I only WISH my desktop computer were as easy to "hard reset" as my Pocket PC is. So here's the question:<br /><br />Let's say you have an application, and as you use that application more and more, it builds up your user preference settings. The question is, where would you want this data stored? In the registry, where it's invisible but hard to back up and restore? (most Pocket PC users don't know how to use a registry editor) Would you prefer to see it as a single file in you My Documents folder? Or would you prefer to have a folder inside My Documents that contained the data? (Maybe something like "My Preferences") Remember this is data that you probably don't want to lose because having to redo all your preferences would be a hassle. So where's the best place to store it?

Antoine
01-10-2003, 12:14 AM
Actually, none of the proposed options fit my preferences. I would rather have the application store my user settings in the application folder (/Program Files/AppX/...). I like to keep the "My Documents" folder clean of things I don't directly control and I agree that the registry is probably too obscure of a place for most users.

Antoine Cloutier

two_wheels
01-10-2003, 12:15 AM
How about in the folder that the program files are in?

dean_shan
01-10-2003, 12:17 AM
I think it would be best to have all the prefrences in a folder like they do on MacOS 9. I think that this would be the best option because would be easy to back up prefrences for people that do not want to mess with their registry.

nz0eBoy
01-10-2003, 12:22 AM
The problem I see with putting it in the application folder is that these files aren't automatically synchronised with ActiveSync, whereas files in the My Documents folder are. What this means is that, if you are like me and do a full back up only occasionally, there is likely to be a more recent copy of the preferences thru activesync if it happens that I need to do a Hard Reset (not that I ever have since I have had my HP 548 - yeah I know I probably should given that things can slow down a bit, but I don't want to go thru and reset all my preferences and restoring a full back up may introduce some of the issues I was trying to get rid of in the first place).

If it were possible that all sofware developers could put their preferences in a folder somewhere that automatically syncs then this would be the ultimate, in my opinion.

Dean

Steven Cedrone
01-10-2003, 12:22 AM
I would vote for a folder beneath My Documents. Aside from most users here, I doubt too many back up their devices. At least this way, it's sync'd to the PC...

Steve

Jason Dunn
01-10-2003, 12:25 AM
The problem I see with putting it in the application folder is that these files aren't automatically synchronised with ActiveSync, whereas files in the My Documents folder are.

Exactly - which is why I don't consider it a legitimate option. Asking people to root through a different folder for every application is, well, a little crazy. :wink:

Kati Compton
01-10-2003, 12:28 AM
I like the idea of it syncing by being in My Documents. I also like the idea of taking my settings with me when I upgrade to a new PPC, which is more of a hassle if it's in registry settings. Plus, I figure less can go strangely wrong if you're not messing with writing to the registry every time you run the program (if in fact the preferences are getting updated as frequently as you implied). Sounds like trouble waiting to happen to me, but I can be paranoid. I figure the fewer writes to the registry the better.

DaleReeck
01-10-2003, 12:32 AM
An ini file would be ideal for ease of use, but it is too problematic. Personally, I wouldn't care where these inis were, as long as all applications would use the same storage place. Since they don't/wouldn't use the same location though, I would prefer the registry. That was the whole idea behind the Windows Registry - a common place to store settings. Unfortunately, the registry has become a massive hodge podge of confusing data. But I see the registry as the lesser of two evils.

paris
01-10-2003, 12:34 AM
Hmmmmm why not play it both safe and efficient?

i asume registry is a good thing for settings since it is fast to retrive them via the os, a plain file would be slower to search when data gets big but it is easy to bak up.

why not have an aplication that uses both? the registry as means for getting the settings fast and the file as means of a backup, if the application finds nothing in the registry it will look for the file to restore the settings.

sounds good to me :D

garrans
01-10-2003, 12:36 AM
My points for why not in Registry

- Backup
- Easy Portability between devices

Why not a pure file
- Don't want everything in one file. 1 per app.
-

Why a directory
- Easy to See & Backup and use
- doesn't clutter up the rest of My Docs

sponge
01-10-2003, 12:37 AM
AHH NO MORE MY DOCUMENTS FOLDERS!!! I've got about 8 folders in My Documents, NONE which I can get rid of, and do nothing but clutter the list boxes. And that doesn't include the couple of subfolders I need to organize my things.

The registry is backed up in ActiveSync's backup, and if people don't backup their devices, well, that's their problem. Besides, the backup feature isn't THAT hard to use, there's really no excuse people shouldn't backup.

brntcrsp
01-10-2003, 12:37 AM
The problem I see with putting it in the application folder is that these files aren't automatically synchronised with ActiveSync, whereas files in the My Documents folder are.

Exactly - which is why I don't consider it a legitimate option. Asking people to root through a different folder for every application is, well, a little crazy. :wink:

If that is the case I would put in a vote for a file in My Docs (although my personal preference is still in the application folder). also if pref files have a common extension then when the user sorts by type they would all be lumped in a common section.

Hawkeyes
01-10-2003, 12:43 AM
XP:
Documents and Settings/Application Data/<app folder name>

So for the PPC:
My Documents/Application Data/<app folder name>

Heck, even have the option of hiding/viewing system folders, just like in XP.

Kati Compton
01-10-2003, 12:48 AM
That might be nice - create a folder called Application Settings, and have the settings for your particular program be a single file within that folder. If a user has multiple programs from your company in there, there's only one extra folder. Also, when uninstalling, delete only the file that pertains to that particular app, and delete the directory only if it's empty.

If other companies/programmers follow the same model, then they could use that same directory to store their application settings as well, making a lot of things much cleaner in terms of file system...

Ed Hansberry
01-10-2003, 12:54 AM
AHH NO MORE MY DOCUMENTS FOLDERS!!! I've got about 8 folders in My Documents, NONE which I can get rid of, and do nothing but clutter the list boxes. And that doesn't include the couple of subfolders I need to organize my things.

Agreed. See http://www.pocketpcthoughts.com/forums/viewtopic.php?t=3836&highlight=zsettings for the answer.

Jason Dunn
01-10-2003, 12:55 AM
The registry is backed up in ActiveSync's backup, and if people don't backup their devices, well, that's their problem. Besides, the backup feature isn't THAT hard to use, there's really no excuse people shouldn't backup.

But what about when you want to rebuild your Pocket PC manually without having to do a restore? In addition to the ActiveSync backup being slow, buggy, and restoring being almost impossible I find that I rarely want to restore my backup because I'll want to install different programs, etc.

This problem is just as bad on the desktop - I have settings scattered all over my hard drive, and no clue how to take them with me when I format my hard drive and start over. I have to email almost every developer to find out where they decided to store the settings.

I think having a single folder in the My Documents tree called Application Settings is the best idea, but the poll results are interesting - it seems everyone has a different idea about what would work best. :lol:

heov
01-10-2003, 12:58 AM
keep it in the registry...
I like to keep documents in "My Documents," not system/preference files...

Also, I think the My Documents folder is a bad idea because so far none of the programs I've used use the folder to store data- and if Spb will be the only one using the folder, it sould seem like a bad idea to me (it might work if MANY MAJOR PPC APPS use the folder)... And if by some reason you guys do change to My Documents, putting it in the Root My Documents would just clutter up the file system IMHO... keep it in a different folder...

I think since most apps use the registry- leave it there. But i do have a gripe- why don't apps remove their registry files after uninstalling? Leaves unwanted junk behind... same w/ the data files in \Windows\AppMgr.

THE PERFECT SOLUTION:
Plus since people won't be able to change the preferences via clicking the file in File Explorer (it will be a data file right? if not, it would take up even more memory to make it run a little app or launch to the app to change the settings), it sould seem kinda pointless to put it there- you have to change it via the program then- and i'd rather not see a file that I cannot manually change or open from the file explorer (well i guess you could w/ a text editor or something, but if you can do that, you can change the registry also probably). Thus, if it's that important to you guys to backup prefrences (they're backed up anyway w/ most backup programs, including AS), you can just have an option to export the reg files to My Documents, and a simple tap on the reg files will change the settings... easy as 1-2-3 ;)

IN SUMMARY:
Keep the prefs in the registry- out of our way (since the end user cannot change settings via the file most likely, must get into program)- and if WE need to back it up, a simple menu item to back up the specific reg files to My Documents is all we need... of course, that's just my opinion :)

Jason Dunn
01-10-2003, 01:00 AM
AHH NO MORE MY DOCUMENTS FOLDERS!!! I've got about 8 folders in My Documents, NONE which I can get rid of, and do nothing but clutter the list boxes. And that doesn't include the couple of subfolders I need to organize my things.

Agreed. See http://www.pocketpcthoughts.com/forums/viewtopic.php?t=3836&highlight=zsettings for the answer.

Ok, so we've got some wacky developers who all want to do their own thing. But if most of the developers started using a folder called Application Settings, we'd all end up with less folders, and one obvious folder that would contain our settings. That would do the trick right?

(I think zSettings is just too confusing) :wink:

Jason Dunn
01-10-2003, 01:04 AM
keep it in the registry...

Not to be argumentative, but if I were to do a poll here asking what % of readers were comfortable going into the registry to find program preferences, I doubt it would be more than 20% - and this is a site full of experts! :lol:

No, the Registry concept failed long ago on the desktop, and it fares no better on the Pocket PC.

Paragon
01-10-2003, 01:12 AM
I think leaving the app setting in the individual application folder is the overall best, and safest place to put them.

To install them anywhere in my documents is asking for problems. It is too easy to access. Here is and example of what I mean by that...How many people have had their Pocket Explorer go south on them and it won't open. 99 times out of 100 it is because a couple of files have been deleted for your My documents folder. Secondly, what would be the benifit of having them all stored in a any other file unless it was an industry standard.....all developers chose to do it....that is a very big trick. I don' think you will ever get all PPC developers to practise this. So, what would be the use, your files would be in different places anyway.

Putting them in the individual application folder allows them to be backed up. It is accessable with being overly accessable, plus if you should mess up with one file you have only killed the settings for one app. Imagine if something happened to a single folder holding all your setting. I know I would not be happy at all.

I think when developing something like this you need to do it to suit the masses, not the small minority who can manipulate a registry, or even care to. It keep the wait times on the support lines down. :-)

Dave

Ed Hansberry
01-10-2003, 01:20 AM
Ok, so we've got some wacky developers who all want to do their own thing. But if most of the developers started using a folder called Application Settings, we'd all end up with less folders, and one obvious folder that would contain our settings. That would do the trick right?
Wacky? See item #4 on my screenshot in that thread. :lol:

(I think zSettings is just too confusing) :wink:
You are entitled to be wrong. :scatter:

Application Settings puts it at the top. Yuck. Maybe if it were a hidden folder that still sync'd and you could view with the "View All Files" setting in FE.

Cortex
01-10-2003, 01:25 AM
I only want MY documents in My Documents.

Stick the program files where they belong....

Think about it.

felixdd
01-10-2003, 01:35 AM
Can you make a registry file like you can with Windows desktops? If you can -- then why not make an "export preferences to file" then "import preferences to file" option? Or it doesn't even have to be in the registry --a text file can do.

Of course...this'll add considerable bulk to the program.

Wiggin
01-10-2003, 01:55 AM
I like the idea of one file (per application) with all user info in it, and all of the files located in one folder under My Documents. I have too many MD-folders already, and one per application sounds terrible. For folks interested in tweaking settings, it places all the variables in one easy place! I also like the "auto backup" benefit that synching with a PC provides. But, it would seem this approach carries with it a bit of accidental-delete-risk. If the user accidently deletes a settings file on the PC or the PPC, it's gone from both after the next synch. :x Of course, backups of the My Doc folders on the PC would solve that, but would folks remember? I don't :lol:

Kati Compton
01-10-2003, 02:12 AM
I state again that I like the idea of a single "Application Settings" folder, and if that worked, I wouldn't be bothered by seeing that one folder when I'm looking through My Documents.

BUT - how do you get other developers on board for this? I mean, if one company uses it, that's better than creating a separate folder for each product, but it's really only effective if this method replaces all (or at least the majority of) program-specific My Documents folders.

jmarkevich
01-10-2003, 02:19 AM
The problem I see with putting it in the application folder is that these files aren't automatically synchronised with ActiveSync, whereas files in the My Documents folder are.

Exactly - which is why I don't consider it a legitimate option. Asking people to root through a different folder for every application is, well, a little crazy. :wink:

I thought you meant a "Application Preferences" folder in "My Documents". You shouldn't need more than one .ini file for any application.

Remember the good old days of Win 3.1 :wink: when you could change your preferences manually? Or uninstall programs if your preferences were really bungled?

disconnected
01-10-2003, 02:23 AM
I don't know what PPC2003 will bring, but I think it should mandate having a file store area like the iPAQ's have, and then maybe settings could go there.

Jonathan1
01-10-2003, 02:23 AM
I'm only starting to get use to Linux and how it works but I'm starting to take a liking to storing everything in plain text format that I can go in and alter. (Windows X settings, etc.)

The Pocket PC should handle setting the same way.

BTS
01-10-2003, 02:29 AM
Definitely in My Documents. The biggest problem that I have, after hard reset, is reinstalling programs and not having my settings. If I have to reset then I can at least easily restore my program settings after reinstalling software.

Mike Wagstaff
01-10-2003, 02:30 AM
Personally, I'd opt for storing preferences/settings data in an individual database that relates only to that particular application. Ideally, I'd like to see the database itself stored in a "Application Preferences" sub-folder located in the application's own folder.

Using a database over a flat file system offers superior speed and (arguably) better reliability. If by some miracle all developers adapated the same standard and all stored the preferences database in the same relative location (the appropriate "Application Preferences" sub-folder for their application), it would also be nice and easy to locate and backup manually. Of course, it would be a simple matter to write a program that would automatically backup your preferences databases for every application.

People have quite rightly said bad things about the registry in earlier posts. Nevertheless, I think that it should stay - but instead of storing the individual settings for each application, it should simply contain a pointer to each application's preferences/settings database.

That way, the OS can still refer quickly and easily to individual application settings, but the registry won't become so bloated and vulnerable to corruption.

How much time do the guys at Spb have on their hands...? ;)

ipaq adam
01-10-2003, 03:19 AM
I'd like all my preferences stored in the folder that the application is in. It's easier to find it there than in the registry (and can be retrieved with software included on the device and with ActiveSync), however, it doesn't clutter up the My Documents folder. I don't like using programs, like RegKing, that toss random files in the "My" Documents folder (maybe have a "Developer's Documents" folder that syncronizes, ha).

I'm not sure I ever liked the concept of a Registry on the Pocket PC. It's disheartening when I go through it and realize how unstructured everything is. With so many developers tossing so many different things into it, and Uninstall being very unreliable at removing what's there, I don't have to imagine why hard resets are so common on a device that could be wonderfully straightforward. So I like the idea of preferences outside of the Registry.

A folder like "Application Settings" sounds cool, but that kind of standard would have to be mandated by Microsoft and the OS, or a really powerful Pocket PC industry organization. Or a forum as well-read as Pocket PC Thoughts.

Programs like TextMaker that toss their stuff in their own folder under "Program Files" are really neat-o!

Unfortunately, there is no option for me to vote for the choice of "In each individual application folder," not even a "none of the above" choice. We are the silent majority!

Jason Lee
01-10-2003, 04:06 AM
I don't mind the registry. It is a bit confusing to dig through but i do it all the time. Every time i install a program i dig through the registry to see what it did.
I don't like now most programs lease all their setting behind when uninstalled. Clutters up the registry. That's why i look through after an install so i will know what to remove after i uninstall.

I do ALOT of setting changes from the registry. More so hacking to OS to make it work how i want than setting changes but what ever... :)

How about doing it like XP. Put a folder in the root called /Application Data or something like that. Not in my documents. That would be easy to back up and would not clutter up you my documents folder. But i would like the files in that folder to be readable so that i can go in and monkey around with the setting that are in the program but the programmer did not give you the option it change from the program.

All the options and setting from WINCE 3.1 are still in PPC 2002 and most of them still work if you can find it in the registry.

sripathi
01-10-2003, 06:06 AM
In a ini file in the same folder along with the application. Also, dll should be copied in the same folder where exe file is located, especailly when you specify memory card as destination.

WyattEarp
01-10-2003, 06:23 AM
I would like to see a program in the settings folder that actually reads the registry and makes it editable. The information is already in the registry it just needs to be translated by a program (other than a registry editor) so the UI is easier to navigate, understand, make changes. It should also automatically be synced with ActiveSync.

I use the registry to make things run my way were I can especially after an uninstall. But for those who don't like messing with the registry a separate program would be nicer. :D


iPAQ H3975 w/128MB+128MB SD+128MB SD+256MB SD+MemPlug+Socket WLAN CF

jaybo_nomad
01-10-2003, 06:27 AM
One argument against placing a preferences file in the same directory as the application is that some people like to put applications on SD cards and the like and then lock them down to prevent corruption. This prevents storing preferences in the application directory.

vincentsiaw
01-10-2003, 06:33 AM
can they make those preference in the strage card instead of main memory?

Birdiestyle
01-10-2003, 07:05 AM
Most people who dont like the idea of the registry, don't understand it. Which is a good thing!! In most situations there is no reason that the users should have to edit their settings by hand. So there is absolutely no need for them to comprehend the registry or feel comfortable digging around it. All user preferences are setup and changed in the application. Allowing these settings to be edited by hand in most situations does not make this a better application. Encapsulation can be considered a Registry benefit.

Saving settings is the point of the registry. It is super fast to access. It works flawlessly when done right. And really there is no penalty to accessing it all the time from a program.

Obviously it is a little more expensive resource wise on a PPC, but it still really isnt much unless you install hundreds of applications and leave the reminants of those applications in the Registry.. Ok, maybe even thousands of applications...

And as long as the Developer(s) know what they're doing, the registry really doesnt get that messed up. If you understand it most of the stuff is put in specific locations. All standard applications written by competent developer's will place their registry settings in a specific place(HKEY_CURRENT_USER\Software\developeraname\applicationname\blah...), so as long as you aren't a poor developer you do not contribute to any "Corruption".

The Registry is also here for COM support which makes it even more scary for people exploring the registry because GUID's(long funky numbers) tend to look spooky, but are very very important to make a lot of cool stuff work right... Thats about 3 books worth...

Anyway, so if the developer really finds it that important to save these settings for their particular applications, in order to restore these settings later, they can do a registry save type file, or create an ini type file to save this information.
I have implemented solutions both ways, and obviously the suggestion made earlier, where if no registry info exists and an ini file is found it is loaded up, works great in most implementations.

Then give the option to save this ini file to the "My Documents" directory somewhere for synching and this system should work fine, but I wouldnt force this on customers, as most dont care, and/or dont want their documents folder that cluttered with this kind of stuff for each of their apps.

Just my thoughts.... I use the registry for all of my applications, but I think most of my configurations arent that complicated that people don't mind reconfiguring them on a fresh install....

Brian
Birdsoft.net

Jonathan1
01-10-2003, 08:19 AM
Brian,

The problem is that it takes just one. One simple app not uninstalling correctly to leave crap behind. One app altering the wrong reg entry to fry some other program's functionality. One sloppy programmer, and there aren’t any of those out there :roll: , to trash the registry or just slightly corrupt it to the point that you get some nice cryptic message during boot up or during a program startup. (Example would be after I uninstalled MapPoint and Word gave me some nice error massages because it was originally tied to MP through the reg.) It’s really a bad idea to store all settings in one big database esp when it’s a database that houses not only program settings but OS settings as well. 8O That alone makes me nervous. If memory serves MS Office 2000 installs something like 3,000 registry entries. That is only 2K. God only know what XP does. Up til now I’ve been talking about the desktop not the Pocket PC. Admittedly the Pocket PC’s registry is MUCH smaller but that doesn’t mean it should be so cryptic. Trying to dig around any registry is difficult to say the least. As you and just about everyone else know the registry entries for any given program can be scattered all over the registry. One key can lead to another which can lead to another and another. This gets tedious after a while. By having all your settings, app files, etc all in one directory dedicated for just that one app you know exactly where to go to troubleshoot a problem with your app vs. the uninstall reinstall method that is all so common in Windows.

Oh and as for your comment on “All user preferences are setup and changed in the application” Wrong. How many programs are out there for Windows XP that have a nice GUI for registry hacks to change system settings that normally aren’t in the OS. I can also name a few times where I’ve had to regedit a setting in Paint Shop Pro, among other apps, because there was a problem with how the file format preferences were set vs. just going into a set directory and start snooping around in those files for the problem.

It’s a total blessing that the Pocket PC’s registry is so small. You can browse through the entire registry, after heard reset, in about 15 minutes. But as the OS becomes more advanced with larger apps being used on it. The registry will continue to grow and swell to an unmanageable size. It’s also a blessing that the resources on the Pocket PC system are so finite. If they were any more powerful you WOULD see apps show up that are registry bloated. As it stands many of the apps that show up on the Pocket PC are very streamlined and limited in how many reg entries they drop into the system.

JonnoB
01-10-2003, 08:27 AM
People are really talking about two different things here.

1) Application settings
2) Application data

The correct method is to store application specific settings in the registry. These can be backed up, but are not that important should they be lost. Application data however should be stored in Application Data directory, but because of a lack of a standard similar to what is found in Win2k/XP desktops, put it in the My Documents folder for easy backup. The data is what needs most to be backed up, the settings however are more transient.

ppcsurfr
01-10-2003, 08:29 AM
I'd like to vote... but I think you didn't include one possible location for the System files to be stored in...

When you install a program, it installs into its own directory inside the Program's folder... why not have this there in the Programs folder inside the particular application's folder?

This wa you do not include the system settings into your ActiveSync files which may be inadvertently deleted by yourself or some other user cleaning up some desktop PC junk.

ppcsurfr

JonnoB
01-10-2003, 08:37 AM
I'd like to vote... but I think you didn't include one possible location for the System files to be stored in...

When you install a program, it installs into its own directory inside the Program's folder... why not have this there in the Programs folder inside the particular application's folder?

This wa you do not include the system settings into your ActiveSync files which may be inadvertently deleted by yourself or some other user cleaning up some desktop PC junk.

ppcsurfr

Moving forward from Win2k (and hopefully applied to CE based OS as well) storing application data in the program folder is a no-no. First, to install you should have administrative rights to the device, but to use you can be a regular user. This restricts read/write to the program directory for programs. Application Data should be stored in a user-context sensitive location and preferences stored in the registry.

Venturello
01-10-2003, 08:46 AM
I think most programmers (as I am) appreciate the registry and remember the advantages why MS went for that solution. Before, in Windows 3.11 and lower, we had ini hell, and we couldnt store binary data inside them (well, we could encode it, but its a pain).

The registry is VERY organized and well structured. It is easy to backup. It is NOT easy to understand to an end user, but it isnt meant to be.

Placing global or app preferences in files under My Documents is a Bad Idea. Remember, 95% or so of pocketpc users are not power users as most of the people here, and if they see prefs.ini or data.bin in their documents, they will edit it/move it/delete it. Having atomized preferences (on each app's folder) is a decent move, up to the developer, but I like more keeping my stuff in a centralized reposit, the registry, which is quite organized, backupable and, for power users, very easily edited and searched upon.

Just my opinion :)

Juan Miguel Venturello

Venturello
01-10-2003, 08:49 AM
XP:
Documents and Settings/Application Data/<app folder name>

So for the PPC:
My Documents/Application Data/<app folder name>

Heck, even have the option of hiding/viewing system folders, just like in XP.

That's application data, not settings/preferences, which is a different thing :)

ppcsurfr
01-10-2003, 08:55 AM
Moving forward from Win2k (and hopefully applied to CE based OS as well) storing application data in the program folder is a no-no. First, to install you should have administrative rights to the device, but to use you can be a regular user. This restricts read/write to the program directory for programs. Application Data should be stored in a user-context sensitive location and preferences stored in the registry.

Hmmm. I don't think so.

We're talking about PPCs here... If you were to load up preferences in the My Documents folder, this will be left open game from the desktop PC for modifications or deletion.

Look at how the preferences of VisualIt's Simple SMS is done... It's kept in a folder in the application's folder... you have access to this via the appliacation itself.

I also think that this is a lot easier to look for than simply dumping it into the registry or kept to hog the MyDocuments resources (say what?) Okay... synch time... Just imagine if you always have your preferences synched to the PC everytime... what a waste.

ppcsurfr

unxmully
01-10-2003, 09:49 AM
One thing that causes me to make less use of my Ipaq file store is that if I do have a hard reset for some reason, the applications in the file store won't work without their settings from the registry and any files they happen to have copied into the windows directory. If all dlls etc. and ini files were in the same directory as the application then I'd have some confidence that there is some point to using the file store. Until then....

As for speed being an issue, well how long does it take to load a small text file into memory and parse? We're not talking about huge applications and huge amounts of data so speed of access to registry vs. ini files should not be an issue.

And the earlier comment about Linux text files by Jonathon1 is spot on. I messed up my X installation yesterday by uninstalling Gnome. All I had to do was fire up vi, edit /etc/sysconfig/desktop and my X installation was back up.

I've never really liked the concept of a registry (bet you couldn't guess :wink: ).

Andy

JonnoB
01-10-2003, 11:17 AM
We're talking about PPCs here... If you were to load up preferences in the My Documents folder, this will be left open game from the desktop PC for modifications or deletion.


You misunderstood what I was saying. Preferences and application data are two different things. Preferences specific to an application should be stored in the registry - period. Application data however should be stored on disk, but perhaps not in 'My Documents' unless it is a 'document' but in an 'Application Data' directory that is user-context aware. This is the model with the current desktop OS.


Look at how the preferences of VisualIt's Simple SMS is done... It's kept in a folder in the application's folder... you have access to this via the appliacation itself.

This is also wrong. This application assumes that the context in which the process is running has both read and write privelages to the program files folder. This should never be assumed.


I also think that this is a lot easier to look for than simply dumping it into the registry or kept to hog the MyDocuments resources (say what?) Okay... synch time... Just imagine if you always have your preferences synched to the PC everytime... what a waste.

ppcsurfr

Seperate in your mind 'preferences,' 'application data' and 'documents'
They should never be mixed.

Adam
01-10-2003, 11:33 AM
I posted my input as response to the thread pointed at by Ed, and then realised that it was from quite a while ago. So here it is. The quote is from a posting on that thread that, the gist is there, but details are on other posts in the thread:

Using a \Windows\Applicaton Data directory that every application stored settings in would solve most issues, and would also prevent the base \Windows directory from getting filled up with all sorts of garbage (which could cause problems if, for example, two applications wanted to store icons with the same name there).

Have to agree with this one. Activestink could then have a setting to allow you to request that it get copied with every sync to a folder on the desktop. Also, those devices with equivalents to the iPAq filestore could give the option to place the folder into there.

It'd mean updates to all a fair number of things, but I think it could be done reasonably easily (PPC patch, activestink upgrade) and then app. developers will just need to switch. I'm sure that users will start gravitating away from those that don't without a good reason.

Ed Hansberry
01-10-2003, 01:39 PM
People are really talking about two different things here.

1) Application settings
2) Application data

The correct method is to store application specific settings in the registry. These can be backed up, but are not that important should they be lost. Application data however should be stored in Application Data directory, but because of a lack of a standard similar to what is found in Win2k/XP desktops, put it in the My Documents folder for easy backup. The data is what needs most to be backed up, the settings however are more transient.
It is two different things but they both should be in My Documents. It used to take me 30-45 minutes to tweak Pocket Informant to my liking every time I installed it on a new device or did a hard reset. Now it takes about 2 seconds - I just make sure the webissettings.reg file is in the WebIS folder in My Documents. Alex moved all user configurable settings from the registry to there.

Now, if only all other application makers did that. Anyone here use Daily Reader? Anyone ever moved that program with your reading progress to another device? I'd rather remove my own appendix than do that again.

Ed Hansberry
01-10-2003, 01:44 PM
This is also wrong.
You are getting philosophical on this. Don't be rigid at the expense of user convenience. There is no reason it should take me 2 hrs to configure my apps after a hard reset. None at all.

jwf
01-10-2003, 02:26 PM
Even though I voted for a folder in My Documents, thinking about it I'd prefer these sort of things to go in the application's folder under Program Files or in the registry. It's horrible having My Documents cluttered up with settings and configuration files - it's a My Documents folder. Just because it gets synchronized is no reason to clutter it up with crap. How often do we expect people to be hard resetting anyway? I know some of you do so on a regular basis, but I haven't hard reset for at least 4-5 months. When I do so, it takes a day or two to get everything back as it should be, but heck, I've just done a hard reset! Sometimes it's nice to start from scratch anyway and not have a load of old settings lying around.

John

ppcsurfr
01-10-2003, 02:38 PM
You misunderstood what I was saying. Preferences and application data are two different things. Preferences specific to an application should be stored in the registry - period. Application data however should be stored on disk, but perhaps not in 'My Documents' unless it is a 'document' but in an 'Application Data' directory that is user-context aware. This is the model with the current desktop OS.

This is also wrong. This application assumes that the context in which the process is running has both read and write privelages to the program files folder. This should never be assumed.

Seperate in your mind 'preferences,' 'application data' and 'documents'
They should never be mixed.

Hmmm. okay.... I don't want to get into a long argument of where to actually put things but here is what I think some PPC users whould want... and that includes me... Maybe some users will have it another way around but I do think that some things are better kept in specific folders so as to avoid confussion. I am talking on the pretext that a number of PPC users are not tech saavy users or geeks. Also, I'm talking about user preferences settings for particular applications... not application data which is currently stored in the Application Data folder in PPC.

Right now, there are applications that store registry settings in the registry alone... Good. This keeps it away from novice hackers who migt render an app useless if ever they find this strange file anywhere in the directory. Some apps store their settings in their specific app folders. Good, they keep this away from the My Documets folder which is easily accessible bt keep them accessible enough to people who are proficient with the file explorer of the Pocket PC.

Remember I am talking about user preferences here... not application data for installation etc., etc., etc.

Here are some examples... CodeWallet Pro used to install user accessible files in the My Documents folder... I hated it! I hated that I had to have these *.wav files and *.jpg/*.bmp files in the My Documents folder which kept on getting synchronized. I liked the one without desktop synch better since it keps these files in the Program Files/DeveloperOne Inc, CodeWallet Pro/Samples folder... away from the synchronized folder.

I also have the samplecustomcards.ccd file inside the Program Files/DeveloperOne Inc, CodeWallet Pro/Samples folder.

Another one is AccessPanel Platinum. I have the presets saved in Flash ROM/FileStore/Built-In Storage/SafeStore/or whatever you'd call it and when I reinstall it, I easily select these preferences in the settings and have all my preset text back in action.

With Simple SMS, I also do the same thing. I keep a copy of the database in a safe place and in case of a reformat... all I have to do is plug in this database and I have everything set for BT connection.

What I see here is that if it were kept in the registry... I would have to make a backup of each registy key just to be able to get things going as it used to. Then you might ask... why not just back things up and do a restore? Well, that is what I'm trying to avoid. In my case, I test, beta test, or run trial apps that have a tendency to leave registry keys as a remant of an uninstall. I just hate that so much and I always end up doing a clean install of evrything... so how about my favorite or essential apps? I also have to reconfigure each one of them... which is a pain! Juat like Transcriber... if you don't save the copy of your transcriber prefs in a safe place... you will have to retrain Transcriber... and I really hate doing that. The sad thing is that Pocket PC 2000/2002 does not have a particular folder for such use... So developers end up loading it in different ways... as a proprietary database file (normally editable via a text editor) or as a registry entry. So the user is on his own to experiment, and learn how to make life easier in the future.

Now if the OS in itself gives a particular area for user preferences to be stored and protected in a way that you cannot inadvertently delete it... or even store it in non-volatile RAM or into Flash ROM... then I guess it would be a great feature.

I think there are some things that are better kept in areas where it can be easily reachable so that they can be modified by the user. One of them would be user preferences for certain applications that let you configre their look, interface, etc... to your particular taste.

I agree with you about Application data not being placed in te MyDocuments folder... Actually I also don't like having any of my applications' user preferences stored in the My Documents folder... but I do feel that an application should either be able to save a setting into a specific file format that when you reformat a PPC... that is do a hard reset... it is easy to get things running again.

I hope it makes it clear too as to what I meant about having the ability to store user preferences in a file that is tangible.

ppcsurfr

ppcsurfr
01-10-2003, 02:46 PM
Jason,

Why didn't you include an option to vote for "Save settings in a folder in the Application's folder" or "Save settings in a folder in the Flash ROM/CF card/SD card"?

I think these are possible areas where they can be stored... Unless you have the option to save it into the CF Card/My Documents folder or something like that.

ppcsurfr

Pony99CA
01-10-2003, 03:45 PM
AHH NO MORE MY DOCUMENTS FOLDERS!!! I've got about 8 folders in My Documents, NONE which I can get rid of, and do nothing but clutter the list boxes. And that doesn't include the couple of subfolders I need to organize my things.

Agreed. See http://www.pocketpcthoughts.com/forums/viewtopic.php?t=3836&highlight=zsettings for the answer.
Ed pointed to the correct thread, but not the correct post. :-) Try this link to see the correct way to do applicaton data and preferences (http://www.pocketpcthoughts.com/forums/viewtopic.php?t=3836&postdays=0&postorder=asc&start=12).

To summarize, there should be an Application Data folder in the Windows folder. Each developer would write their data and preferences to a sub-folder in Applicatoin Data. Microsoft would be required to make a bit of a change to keep this data backed up easily (synchronizing it would be fine, because data would only get synchronized if it was changed).

Until Microsoft makes the updates needed to back up \Windows\Application Data, though, using a folder in My Documents (like \My Documents\Application Data) would be an acceptable, but ugly, stop gap.

Files that the application needs but never changes, like WAV and JPG files, should be stored in the application's folder in the Program Files folder. Too many applications seem to install those in the Windows directory, which could lead to conflicts and certainly makes it difficult to find things in the Windows folder.

Steve

Ed Hansberry
01-10-2003, 03:52 PM
AHH NO MORE MY DOCUMENTS FOLDERS!!! I've got about 8 folders in My Documents, NONE which I can get rid of, and do nothing but clutter the list boxes. And that doesn't include the couple of subfolders I need to organize my things.

Agreed. See http://www.pocketpcthoughts.com/forums/viewtopic.php?t=3836&highlight=zsettings for the answer.
Ed pointed to the correct thread, but not the correct post. :-) Try this link to see the correct way to do applicaton data and preferences (http://www.pocketpcthoughts.com/forums/viewtopic.php?t=3836&postdays=0&postorder=asc&start=12).

To summarize, there should be an Application Data folder in the Windows folder.
No. At some point, you have to assume there will be multiuser capability on these devices and sticking preferences in \windows\ is as lame as sticking .ini files in the \windows\ folder from the Windows 3.1 days. Plus, you want this stuff to sync over and be on your desktop so in the event of an unplanned hard reset, all of your data is on your PC, waiting to be put back on the device.

Pony99CA
01-10-2003, 03:56 PM
I think leaving the app setting in the individual application folder is the overall best, and safest place to put them.

To install them anywhere in my documents is asking for problems. It is too easy to access. Here is and example of what I mean by that...How many people have had their Pocket Explorer go south on them and it won't open. 99 times out of 100 it is because a couple of files have been deleted for your My documents folder.

If by "Pocket Explorer" you meant Pocket Internet Explorer (there is a program called PocketExplorer), those files (CMMapG, CMMapP and GCounterFile.mmf) are in the device's root, not My Documents. They are hidden, but I guess many people (like me) display hidden files. :-)

I've ranted about it before, but why aren't those in the \Windows folder? Those files should be hard to find.
:onfire:

Steve

Pony99CA
01-10-2003, 04:07 PM
To summarize, there should be an Application Data folder in the Windows folder.
No. At some point, you have to assume there will be multiuser capability on these devices and sticking preferences in \windows\ is as lame as sticking .ini files in the \windows\ folder from the Windows 3.1 days. Plus, you want this stuff to sync over and be on your desktop so in the event of an unplanned hard reset, all of your data is on your PC, waiting to be put back on the device.
Yes, and when Pocket PCs become multi-user :!:, the directory structure will change to \Windows\&lt;name>\Application Data\&lt;manufacturer> or \Windows\Application Data\&lt;name>\&lt;manufacturer>. I don't see how zSettings works any better when multiple users are taken into account.

I don't have Windows XP yet, but I know they have something like \&lt;name>\Documents and Settings, but settings should not be stored with documents. They are different beasts, as JonnoB said.

Steve

Jason Lee
01-10-2003, 04:43 PM
Or we can just forget about changing an industry standard and go on with life where we can talk about new PPC stuff! :D

Ed Hansberry
01-10-2003, 05:10 PM
Yes, and when Pocket PCs become multi-user :!:, the directory structure will change to \Windows\&lt;name>\Application Data\&lt;manufacturer> or \Windows\Application Data\&lt;name>\&lt;manufacturer>. I don't see how zSettings works any better when multiple users are taken into account.

I don't have Windows XP yet, but I know they have something like \&lt;name>\Documents and Settings, but settings should not be stored with documents. They are different beasts, as JonnoB said.
Windows XP/2K/NT put everything in a specific user folder, though it has changed within releases.

XP uses \Documents and Settings\userid\
Then from there you have:
Application Data
Local Settings
NetHood
PrintHood
Recent
SendTo
Templates
Desktop
Favorites
Start Menu
WINDOWS

Plus a few more depending on what is installed. My Documents is also usually there, but I moved mine to another partition.

So, what goes in \Windows\ in the root? Nothing other than .dll files necessary to run apps. Any old apps that like to put settings in \Windows\ are fooled into using the "WINDOWS" folder above. So putting anything in \windows\ is just wrong and a step back.

I don't care if it goes in \my documents\ or not, but it darn well better sync over to my desktop everytime I sync, and that can be done TODAY if developers get together and put evertyhing in \my documents\application settings\program name folders.

Jason Dunn
01-10-2003, 05:22 PM
Jason,

Why didn't you include an option to vote for "Save settings in a folder in the Application's folder" or "Save settings in a folder in the Flash ROM/CF card/SD card"?

Why? Because I didn't think of it.

And besides, if I did, you wouldn't be able to complain about my poll, right? :lol: This is what happens when I forget to put an option for poll-hatin' people.... :agrue:

Adam
01-10-2003, 05:25 PM
I don't care if it goes in \my documents\ or not, but it darn well better sync over to my desktop everytime I sync, and that can be done TODAY if developers get together and put evertyhing in \my documents\application settings\program name folders.

But as all synching (AFAIA) requires Activestink, which synchs the files, any change to the OS to use the new directory structure and synch the settings directory, too. This could possibly be an optional synch in the way that files are.

There's no reason why directories not under /My Documents shouldn't be synchronisable.

Jason Dunn
01-10-2003, 05:27 PM
Or we can just forget about changing an industry standard and go on with life where we can talk about new PPC stuff! :D

But that's just it - there IS no "industry standard" here. Every developer does their own thing, and it's a huge mess. :evil: It's easy to see why - look at how many people are disagreeing in this thread alone, and many of them aren't even Pocket PC developers...

Jason Dunn
01-10-2003, 05:30 PM
I don't care if it goes in \my documents\ or not, but it darn well better sync over to my desktop everytime I sync, and that can be done TODAY if developers get together and put evertyhing in \my documents\application settings\program name folders.

Yeah, this is really what I was after. Ideally, it would NOT live in My Documents, but I'm talking about doing this for an application that Spb will be releasing in a matter of months, not years. Are we going to see a new version of ActiveSync and a Pocket PC OS with an Application Settings in the root that will sync over to the desktop PC within that timeframe? No. :?

So this whole discussion is a stop-gap measure in a sense - I obviously should have been clearer about that in my initial post. I need a solution NOW, not a theoretical one that Microsoft may implement in 2005.... :wink:

Jason Dunn
01-10-2003, 05:31 PM
There's no reason why directories not under /My Documents shouldn't be synchronisable.

I agree completely, but the words "ActiveSync 3.x" are reason enough - they didn't allow for that functionality, and unless a new version magically appears very soon, we (Spb) have to come up with a real-world solution that works with the tools we have today (ActiveSync 3.6).

JonnoB
01-10-2003, 05:35 PM
You are getting philosophical on this. Don't be rigid at the expense of user convenience. There is no reason it should take me 2 hrs to configure my apps after a hard reset. None at all.

One of the best things about programming on Microsoft based platforms is a general conformity that makes using one application very similar to using another. This also applies to user, application, and potentially, time and location sensitive data and preferences. To have each developer decide on a whim to store data here or there will only add to a problem I already see on the Pocket PC where I have no idea what to back up, what data is where, etc. I think Microsoft needs to step forward here and make a stand and hopefully implement documented standards that are similar to the desktop OS.

The only reason I see for application providers to store any non-document data in the My Documents folder is to provide some sort of 'backup' of that data. It would be better if they did not depend on the file-sync provider (cefstore.dll, MS.WinCE.CEFStore). They can implement their own ActiveSync provider, but are probably reluctant to do so, as probably 90+% of the functionality they want is already implemented in
cefstore.

ppcsurfr
01-10-2003, 06:39 PM
Well, I think some people hate having unknown files/strange files occupying space in their My Documents folder... Also... if these became visible in the desktop... you run the risk of deleting these files and render an application useless... not to mention a possible useless PPC altogether.

Or, if ever you decide to store such settings in the My Documents folder... at least have a provision to save it into the My Documents folder in a CF, SD or permanent storage area.

I do think aside from applications data, MS should also include another folder called Users Prefs or something... or even better yet have this in Flash ROM.

ppcsurfr

Pony99CA
01-10-2003, 07:57 PM
I don't care if it goes in \my documents\ or not, but it darn well better sync over to my desktop everytime I sync, and that can be done TODAY if developers get together and put evertyhing in \my documents\application settings\program name folders.

Well, we more or less agree, I think. I don't care if an Application Data folder goes under the Windows folder or is a new root-level directory; I want it easy to backup (and sync for applications that have a desktop component). If Microsoft wants to rename My Documents to Documents and Settings, then have one sub-folder called Settings and another called Documents, that's fine with me, too (as long as they make sure the file open dialogs will see at least one level deeper :-)).

As I said, putting it under My Documents will be OK for now, but as the files are not documents, I don't want it to go there permanently.

Steve

cludwig
01-10-2003, 08:04 PM
There's no reason why directories not under /My Documents shouldn't be synchronisable.

I agree completely, but the words "ActiveSync 3.x" are reason enough - they didn't allow for that functionality, and unless a new version magically appears very soon, we (Spb) have to come up with a real-world solution that works with the tools we have today (ActiveSync 3.6).

Here's some "outside the box thinking":

Spb could write (and include with this forthcoming product) an ActiveSync synchronizer module (call it "Preferences" or "Settings" so it looks nice in the list of synched things in ActiveSync) that _does_ back up (on behalf of all like-minded applications) a non-"My Documents" directory that acted as the root for a "folder per app" approach. (Maybe "\Documents and Settings\Default User\Application Data" or just \Application Data, depending on how likely you believe multi-user support in the future is.)

Put this module out with your product and also make it freely available to users and it seems likely that other developers might follow your lead.

With this in place, developers have the benefit of a standard system that works like WinXP / Win2000, doesn't clutter My Documents, and puts control over whether or not this data gets synchronized all of the time into the hands of the user, via the standard ActiveSync "Tools->Options..." dialog.

I haven't written a Sync module for ActiveSync myself, but plenty of folks have, so it can't be that tough.

With this approach I think a lot of people get what they want, and Spb solves a problem not just for themselves but for many developers and users.

If you wanted to be really ambitious, that app could also take some of the common (ie unlikely to go away because they are published and would break apps if they did) "Settings" (Start->Settings->Personal, System, Connections) and copy them out of the PocketPC registry and into a file on the desktop side... then keep those synced too. This makes it even less painful to recover from a hard reset when a true Backup is unavailable or doesn't work (because of different device type, etc.)

That'll be $.02 please. ;-)

Pony99CA
01-10-2003, 08:05 PM
I don't care if it goes in \my documents\ or not, but it darn well better sync over to my desktop everytime I sync, and that can be done TODAY if developers get together and put evertyhing in \my documents\application settings\program name folders.

Yeah, this is really what I was after. Ideally, it would NOT live in My Documents, but I'm talking about doing this for an application that Spb will be releasing in a matter of months, not years. Are we going to see a new version of ActiveSync and a Pocket PC OS with an Application Settings in the root that will sync over to the desktop PC within that timeframe? No. :?

So this whole discussion is a stop-gap measure in a sense - I obviously should have been clearer about that in my initial post. I need a solution NOW, not a theoretical one that Microsoft may implement in 2005.... :wink:
Well, either use the registry, a file in the application's directory or a folder under My Documents. Do not put a file in My Documents, please.

However, are these setttings something special that the user would want to back up? If they're just typical user preferences, I wouldn't worry about synchronizing them, but if they're things that are difficult to reproduce or remember (like my latitude and longitude), put them where I can get them, or include an Export capability to get the settings out of the registry.

Steve

Steven Cedrone
01-10-2003, 08:11 PM
Spb could write (and include with this forthcoming product) an ActiveSync synchronizer module (call it "Preferences" or "Settings" so it looks nice in the list of synched things in ActiveSync) that _does_ back up (on behalf of all like-minded applications) a non-"My Documents" directory that acted as the root for a "folder per app" approach. (Maybe "\Documents and Settings\Default User\Application Data" or just \Application Data, depending on how likely you believe multi-user support in the future is.)


Even better, come up with an ActiveSync module that backs up the registry to the PC...

Steve

Pony99CA
01-10-2003, 08:12 PM
Here's some "outside the box thinking":

Spb could write (and include with this forthcoming product) an ActiveSync synchronizer module (call it "Preferences" or "Settings" so it looks nice in the list of synched things in ActiveSync) that _does_ back up (on behalf of all like-minded applications) a non-"My Documents" directory that acted as the root for a "folder per app" approach. (Maybe "\Documents and Settings\Default User\Application Data" or just \Application Data, depending on how likely you believe multi-user support in the future is.)

Put this module out with your product and also make it freely available to users and it seems likely that other developers might follow your lead.

With this in place, developers have the benefit of a standard system that works like WinXP / Win2000, doesn't clutter My Documents, and puts control over whether or not this data gets synchronized all of the time into the hands of the user, via the standard ActiveSync "Tools->Options..." dialog.

I haven't written a Sync module for ActiveSync myself, but plenty of folks have, so it can't be that tough.

With this approach I think a lot of people get what they want, and Spb solves a problem not just for themselves but for many developers and users.

If you wanted to be really ambitious, that app could also take some of the common (ie unlikely to go away because they are published and would break apps if they did) "Settings" (Start->Settings->Personal, System, Connections) and copy them out of the PocketPC registry and into a file on the desktop side... then keep those synced too. This makes it even less painful to recover from a hard reset when a true Backup is unavailable or doesn't work (because of different device type, etc.)

That'll be $.02 please. ;-)
Your check is in the mail. :-D I think that's a cool idea for a new utility.

Also, if it allows the user to select some existing files on their Pocket PC to backup/sync (like common backup software), that would allow us to back up applications that store their settings in the application's directory.

Steve

cludwig
01-10-2003, 08:34 PM
Spb could write (and include with this forthcoming product) an ActiveSync synchronizer module (call it "Preferences" or "Settings" so it looks nice in the list of synched things in ActiveSync) that _does_ back up (on behalf of all like-minded applications) a non-"My Documents" directory that acted as the root for a "folder per app" approach. (Maybe "\Documents and Settings\Default User\Application Data" or just \Application Data, depending on how likely you believe multi-user support in the future is.)


Even better, come up with an ActiveSync module that backs up the registry to the PC...

Steve

I thought about that and considered that there might be so many things changing in the registry for so many reasons that it might be dangerous... You certainly wouldn't want to change the whole registry back to the way it was the last time you synced every time you synced.

The logic would have to be slightly more subtle than a straight backup. You'd want to compare the registry items on the PocketPC and Desktop key by key and then I guess you make sure the PocketPC registry entries would have to _ALWAYS_ win the internal "Resolve Items" debate (if it's changed on the PocketPC then copy to desktop, if it's not present on PocketPC then restore to PocketPC). That works since there's no chance of changing them on the desktop side.

Steven Cedrone
01-10-2003, 08:37 PM
I thought about that and considered that there might be so many things changing in the registry for so many reasons that it might be dangerous... You certainly wouldn't want to change the whole registry back to the way it was the last time you synced every time you synced.


Good point, I was thinking backup, and not thinking sync...

The logic would have to be slightly more subtle than a straight backup. You'd want to compare the registry items on the PocketPC and Desktop key by key and then I guess you make sure the PocketPC registry entries would have to _ALWAYS_ win the internal "Resolve Items" debate (if it's changed on the PocketPC then copy to desktop, if it's not present on PocketPC then restore to PocketPC). That works since there's no chance of changing them on the desktop side.

You have been thinking about this, haven't you? :wink:

Steve

JonnoB
01-10-2003, 08:40 PM
I thought about that and considered that there might be so many things changing in the registry for so many reasons that it might be dangerous... You certainly wouldn't want to change the whole registry back to the way it was the last time you synced every time you synced.

The logic would have to be slightly more subtle than a straight backup. You'd want to compare the registry items on the PocketPC and Desktop key by key and then I guess you make sure the PocketPC registry entries would have to _ALWAYS_ win the internal "Resolve Items" debate (if it's changed on the PocketPC then copy to desktop, if it's not present on PocketPC then restore to PocketPC). That works since there's no chance of changing them on the desktop side.

Actually, what you want is a typical one-way registry sync (copy) on normal sync operations from AS with an option in the provider UI to go back to a previous setting... kind of like WinXPs ability to restore the registry from a previous date should something go wrong. This allows a user to experiment safely with the registry and with application settings. Again, these settings across applications should conform to a single standard and follow the lead of the desktop OS.

Wiggin
01-10-2003, 09:48 PM
If you were to head down the "registry" path, and can solve the backup/restore challenge of the Reg file, what ideas would you have on how to restore only part of a Reg file?
I can think of one scenario where I have loaded 5 or 6 apps onto the PPC, used em, maybe even mucked with the Reg file settings, and then get in trouble, freeze PPC, and need to Restore my Reg File. No prob you say, just grab the backup on the PC. Prob is, the backup may include some of the bogus changes, and a restore just brings back the problem.
I like the idea of a Reg file restore, but a selective restore would be ideal, albeit pretty complex to simplify for the avg user.
Ideas? :roll:

JonnoB
01-10-2003, 10:00 PM
I like the idea of a Reg file restore, but a selective restore would be ideal, albeit pretty complex to simplify for the avg user.
Ideas? :roll:

Yes, a time-stamp aging archive of the registry. WinXP does this and you can select from multiple 'times' to reset your PC to. This could be easily done with the Pocket PC as well. You could archive the most recent X registry backups and put back from any that you have archives. If you know for example that yesterday you were ok after you installed app A, but something went awry after you installed app B in the evening, you could go to the registry version that was previous to the app B installation but after app A.

Wiggin
01-10-2003, 10:07 PM
Yes, a time-stamp aging archive of the registry. WinXP does this and you can select from multiple 'times' to reset your PC to. This could be easily done with the Pocket PC as well.
I like where you're going. Now a wrinkle. I've loaded apps A-E over a period of weeks, say trial versions. Used em, mucked em, get in trouble, want to go back to life before A-E...EXCEPT app B. It was great, I had it configured exactly as I wanted (which took 2 long hours). So I want to restore life before A, skip A, grab B, and skip C-E.
App level restore? Would be kewl n'est pas?

JonnoB
01-10-2003, 10:17 PM
App level restore? Would be kewl n'est pas?

Not by default in a complete restore... However, if apps behave properly and store prefs in the proper location, there is no reason to do HKLM and HKCU app-specific restorations of the registry.

Jason Dunn
01-10-2003, 11:01 PM
Some great ideas guys! Keep 'em coming - I like the concept of a ActiveSync Conduit that would automatically back up an Application Settings folder in the root of the device.

I agree with keeping My Documents nice and clean - it just seemed like the easiest way to accomplish what I wanted: keep the settings in sync. At some point when a program has been customized heavily "settings" become "data".

The registry sync/compare idea is interesting, but too complex for most consumers.

Pony99CA
01-11-2003, 09:47 AM
I like the idea of a Reg file restore, but a selective restore would be ideal, albeit pretty complex to simplify for the avg user.
Ideas? :roll:

Yes, a time-stamp aging archive of the registry. WinXP does this and you can select from multiple 'times' to reset your PC to. This could be easily done with the Pocket PC as well. You could archive the most recent X registry backups and put back from any that you have archives. If you know for example that yesterday you were ok after you installed app A, but something went awry after you installed app B in the evening, you could go to the registry version that was previous to the app B installation but after app A.
Why not just go all the way and have a change control system for the registry? Every time something changed the registry, you would create a reverse delta of the changed keys. A certain number of reverse deltas would be archived for recovery purposes.

As long as two applications didn't hit the same key, you could back out each application individually.

Steve

JonnoB
01-11-2003, 03:52 PM
Why not just go all the way and have a change control system for the registry? Every time something changed the registry, you would create a reverse delta of the changed keys. A certain number of reverse deltas would be archived for recovery purposes.

As long as two applications didn't hit the same key, you could back out each application individually.

Steve

I had thought of that, but it would be too costly in performance. There are so many writes to the registry, and the registry is a very high-performance database - why hinder that... writing to the registry would be a major hit on the CPU and file system. The registry already does its own backup and sanitization. The suggestion of periodic backups aged over time is exactly how the current desktop OS (WinXP) does it now and seems to be what MS came up with after lots of years trying to make that process robust and useful for recovery.

Wiggin
01-11-2003, 11:55 PM
The registry already does its own backup and sanitization.
Can you explain this a bit more? I was unaware that the Reg sanitized itself. I am aware that the Reg file often contains entries for applications that have been deleted. :x It always amazes me that app developers can't remember to scrub the Reg file upon an App Remove. Along that line, I was working on my Reg file yesterday and found a set of records for FelxWallet from Two Peaks SW, which I removed weeks ago. Classic! :x

Pony99CA
01-12-2003, 03:03 AM
The registry already does its own backup and sanitization.
Can you explain this a bit more? I was unaware that the Reg sanitized itself.
I was confused about that, too. I know that regupdater.exe runs after a soft reset, and that may do some sanitization, but it is probably just checking items the system itself needs, not other installed applications.

As for the registry backing itself up, where is that done? If there is a backup, maybe it's only restored if the system detects a corrupted registry.

I wish Microsoft would provide system tools for power users (for free, of course :-)).

Steve

The PocketTV Team
10-04-2003, 07:03 AM
I am aware that the Reg file often contains entries for applications that have been deleted. :x It always amazes me that app developers can't remember to scrub the Reg file upon an App Remove.
This is in general by design (i.e. on purpose). Many applications prefer to leave their settings in the registery so that you could easiely update the application (i.e. install a new release) without loosing your settings and having to re-register it.

When installing a new version, the system first un-installs the old version, then installs the new one. That's the way the Pocket PC app installer works.

If un-installing the old version erases the application's registry key, all the user's preferences and the registration key (if any) are lost. In most cases, that's not what the user want.

Which is why developers often configure their applications and CAB files so that un-installing applications does not remove the application's registry key. That's what we do with PocketTV, and we do it on purpose, for the reason above.

Note that wasted space in the registry is generally not an issue, as the memory used for each application's settings in the registry is only a few hundred bytes at most. So even if you install, then un-install, one hundred applications (which is a lot!!!), the wasted space would still be acceptable. And if you are really concerned you can always get PHM Regedit (free) to clean-up the registry manually.