LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 6 Jan 2007 13:37:31 +1100
Reply-To:   gordon <gordononline@OPTUSNET.COM.AU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   gordon <gordononline@OPTUSNET.COM.AU>
Subject:   Best way to store user configuation
Comments:   To: sas-l@uga.edu

Hi

I am looking to store some details about a user's configuration choices, in particular the place where they have installed some data files, the OS that they use, and their Windows user name. This information is used in a windows C#.net application.

I would like to capture this info the first time that the user opens the app, but each subsequent time to make sure that the location is current when they open the application. This is because the users may move items around on their system and this may cause some oledb sql statements to fail.

Could you please suggest a design that you have used for this - i am reluctant to write to the system registry as many users dont have local admin rights to their PCs. I am thinking of the following pattern - but not sure if it is the best one:

1. as part of the deployment, copy a config file to the same directory as the application. 2. in that config file - set counter =0; user name =" ", OS=""; 3. when the application is opened check to see if counter =0; 4. if counter is =0 then get the file location (from the OpenFileDialog and the OS and user name and write to the config file; 5. populate the variables that require this information. 6. increment the counter; 7. close the file. 8. if counter >0 read the data in the config file and populate the variables that need this information 9. increment the counter; 10 .close the file

If you see any major flaws in my logic or if you can suggest an alternative (including the best way to store the information about the location, os and username) please let me know.

Doug

What is the best way to store this information.


Back to: Top of message | Previous page | Main SAS-L page