Sahil Malik wrote:
My recommendation would be to store stuff in the application.con fig file
rather than the system registry because for security reasons there's a
(good
or bad) push towards letting the average joe user run his machine as a
non-admin, and to qualify for "Runs on Windows XP" label, your app must be
able to run without running as admin - i.e. it cannot access registry.
I don't think that's quite correct. As a non-admin, you are allowed to make
changes that just affect you, but you can't make system wide changes (that
requires admin rights). In particular, you can make changes to the registry
under HKEY_CURRENT_US ER (and read from HKEY_LOCAL_MACH INE).
As for the config file, this is always stored in the same folder as the
running application. However, non-admin users can't make any changes under
C:\Program Files (to avoid the problem where a virus gets onto your machine,
and infects every other installed application). So, certainly don't put your
database there (as Rulin Hong suggested). If you know that the database
won't move after the application is installed, then storing the location in
the config file would work.
In a more general case (like the MRU list of databases in Access), the
user's section of the registry would be a good place to store the list. You
can also store user-specific information in their profile, e.g. C:\Documents
and Settings\John\A pplication Data\<my company>\<my app>
I certainly agree that it's a good idea to develop applications that don't
require admin rights, and I think that the best way to achieve this is for
you (as a developer) not to have admin rights on your machine; keep a
separate login account for times when you need to install software etc. I've
been doing that for the last few months, and it's working well for me.
John