|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
My.Settings.Addsmall applications as a way to get my feet wet with some of the new functionality. There are many new features which are really going to make coding a lot simpler. One area I'm investigating is the new "My.Settings" object. Managing these is so very easy now, except for one problem. In nearly all of my applications, I use a class I wrote for reading/writing settings. This class will build the MyApp.exe.config file if it's missing and will add setting entries with default values if they're missing. The 'system' settings and the 'user' settings are in one file (or two, if I choose). This way it's very easy for someone to copy the config file(s) with the .exe and have the same user settings on multiple machines. Is there a way to specify where the user config settings are stored, assuming you have the right permissions to read/write the file location, of course? Thanks! -Jason Kendall JasonKend***@hotmail.com Short of writing your own settings provider, no, you can't specify the path
to the location of the user.config file. Raghavendra explains why in his blog in his Client Settings FAQ http://blogs.msdn.com/rprabhu/articles/433979.aspx Just out of curiosity, why do you want to change the path? Best regards, Johan Stenberg (MSFT Visual Basic) Show quoteHide quote "Jason Kendall" wrote: > I've recently installed Beta 2 ov Visual Studio and an updating a few > small applications as a way to get my feet wet with some of the new > functionality. There are many new features which are really going to > make coding a lot simpler. > > One area I'm investigating is the new "My.Settings" object. Managing > these is so very easy now, except for one problem. In nearly all of > my applications, I use a class I wrote for reading/writing settings. > This class will build the MyApp.exe.config file if it's missing and > will add setting entries with default values if they're missing. The > 'system' settings and the 'user' settings are in one file (or two, if > I choose). This way it's very easy for someone to copy the config > file(s) with the .exe and have the same user settings on multiple > machines. > > Is there a way to specify where the user config settings are stored, > assuming you have the right permissions to read/write the file > location, of course? > > Thanks! > > > -Jason Kendall > JasonKend***@hotmail.com > > Thanks for your reply!
"Just out of curiosity, why do you want to change the path?" Really, the only reason is so that the user can copy all of their settings, along with the executable, to a removable storage device and put it on another machine. The default location for user configuration settings is cryptic enough for some users that they'd never find it. :-) I'll probably write my own settings provider and use it in these rare instances. Thanks so much! -Jason Kendall JasonKend***@hotmail.com On Sun, 3 Jul 2005 10:08:01 -0700, Stenis <Ste***@discussions.microsoft.com> wrote: Show quoteHide quote >Short of writing your own settings provider, no, you can't specify the path >to the location of the user.config file. > >Raghavendra explains why in his blog in his Client Settings FAQ > >http://blogs.msdn.com/rprabhu/articles/433979.aspx > >Just out of curiosity, why do you want to change the path? > >Best regards, >Johan Stenberg (MSFT Visual Basic) > >"Jason Kendall" wrote: > >> I've recently installed Beta 2 ov Visual Studio and an updating a few >> small applications as a way to get my feet wet with some of the new >> functionality. There are many new features which are really going to >> make coding a lot simpler. >> >> One area I'm investigating is the new "My.Settings" object. Managing >> these is so very easy now, except for one problem. In nearly all of >> my applications, I use a class I wrote for reading/writing settings. >> This class will build the MyApp.exe.config file if it's missing and >> will add setting entries with default values if they're missing. The >> 'system' settings and the 'user' settings are in one file (or two, if >> I choose). This way it's very easy for someone to copy the config >> file(s) with the .exe and have the same user settings on multiple >> machines. >> >> Is there a way to specify where the user config settings are stored, >> assuming you have the right permissions to read/write the file >> location, of course? >> >> Thanks! >> >> >> -Jason Kendall >> JasonKend***@hotmail.com >> >> Have you considered adding an import/export settings function in your program
instead? I would *not* recommend having your application write in the program files folder - if you are running under a "normal" non admin account, this will most likely fail, since you don't have write access there. Best regards, Johan Stenberg Show quoteHide quote "Jason Kendall" wrote: > Thanks for your reply! > > "Just out of curiosity, why do you want to change the path?" > Really, the only reason is so that the user can copy all of their > settings, along with the executable, to a removable storage device and > put it on another machine. The default location for user > configuration settings is cryptic enough for some users that they'd > never find it. :-) > > I'll probably write my own settings provider and use it in these rare > instances. > > Thanks so much! > > > -Jason Kendall > JasonKend***@hotmail.com > > > > > On Sun, 3 Jul 2005 10:08:01 -0700, Stenis > <Ste***@discussions.microsoft.com> wrote: > > >Short of writing your own settings provider, no, you can't specify the path > >to the location of the user.config file. > > > >Raghavendra explains why in his blog in his Client Settings FAQ > > > >http://blogs.msdn.com/rprabhu/articles/433979.aspx > > > >Just out of curiosity, why do you want to change the path? > > > >Best regards, > >Johan Stenberg (MSFT Visual Basic) > > > >"Jason Kendall" wrote: > > > >> I've recently installed Beta 2 ov Visual Studio and an updating a few > >> small applications as a way to get my feet wet with some of the new > >> functionality. There are many new features which are really going to > >> make coding a lot simpler. > >> > >> One area I'm investigating is the new "My.Settings" object. Managing > >> these is so very easy now, except for one problem. In nearly all of > >> my applications, I use a class I wrote for reading/writing settings. > >> This class will build the MyApp.exe.config file if it's missing and > >> will add setting entries with default values if they're missing. The > >> 'system' settings and the 'user' settings are in one file (or two, if > >> I choose). This way it's very easy for someone to copy the config > >> file(s) with the .exe and have the same user settings on multiple > >> machines. > >> > >> Is there a way to specify where the user config settings are stored, > >> assuming you have the right permissions to read/write the file > >> location, of course? > >> > >> Thanks! > >> > >> > >> -Jason Kendall > >> JasonKend***@hotmail.com > >> > >> > >
saved bitmap size
How to convert error code to text?? imagelist and bitmaps Send datagrid via email Need Help With Translation C#? to VB Change Value of Existing Element How To? import vb net forms ??? Monitor process creation MessageBox coming up with blank message and blank buttons. how pass data between forms |
|||||||||||||||||||||||