Change The User Settings (*.config) File Location?

May 18, 2009

I am just not happy with the fact that the user.config file gtets saved in the user's account folder. Is there a way to save it in the Application's Startup Folder instead? I couldn't find any configuration properties within the PROJECT PROPERTIES which would let me change the file location.

View 2 Replies


ADVERTISEMENT

VS 2008 - My.Settings File - Specify The Location For User.config File

Jan 3, 2010

I'm looking for a way to specify the location for the User.config file that is used for storing the My.Settings object. It appears that this is not possible. The problem for me is, I don't want to be responsible for creating several different files on the users computer that really have no use and are difficult to find and clean once an update is released. For most users, this is not a serious problem, as many will probably never update the software, and most will probably only go through a couple of updates. On my system, there are config files for every build of the application, and the same to a lesser extent will be true for my beta testers.

I can understand that MS wants to make sure that no two applications will use the same location for storing application data, but a simple [UserData] [CompanyName][ApplicationName] for storing application data will probably suffice for 99.9999 percent of the legitimate applications in the world. Bogging a user's system down with erroneous files, no matter how small, is an unnecessary drain on system resources and a potential source of problems for the user. It's bad enough that most programs leave bits and pieces of themselves all over a user's system after De-installation - this to me seems only to exaggerate this problem.

Is the only way to get around this problem to write a whole new Settings Class? Is there a way to change the location of the UserConfig file to a more friendly (and more predictable) location that I am not finding for myself? It would seem that having at least the OPTION to specify a location for the User.Config file would be OBVIOUS and easy to implement, so why did they leave this out?

View 5 Replies

Save Application Settings But For USER But Cannot Find The User.config File

Aug 7, 2009

in vb.net i am trying to save application settings but for USER but i cannot find the user.config file

when does this file get created?

i searched my entire hardrive. i also searched the entire project.

View 2 Replies

My.Settings & Application.StartupPath - Allow The User To Be Able To Change The Location Of This Subfolder

Oct 23, 2011

I have an app that will need a file repository located in a subfolder in my program's directory. For example: c:program files (x86)myapplicationmyfiles But, I need to allow the user to be able to change the location of this subfolder if they wish to store them on a network drive etc..

[Code]...

View 4 Replies

Change The Location Of The App.config File - Vb 2010?

Feb 26, 2012

Im trying to make a program that works a bit like the log in on a computer. But i cant make it load a different .config file depending on what username is used. I want it to load a config file from different directories that match the username. eg if the username was bob then it could be: C:MyProgramLoginBobapp.config I've been teaching myself and this has had me stuck for ages.

View 16 Replies

Set Default Location Of User.config File?

Mar 26, 2012

I made a project in VB.NET 2008. When I update my project I change the assembly version but the problem is that when the user gets the new version they lose their user settings.[code]Note the version number in the path. Is there any way save in a location not affected by changing the version?

View 1 Replies

VS 2010 - User Settings (App Config File)

Mar 6, 2011

After reading through a bunch of stuff, I was curious what production developers use for config files. I know that there is an app.config file that can be modified by the user of the program w/ settings. I also know I can create my own .xml file or .ini file to store settings as well. I wanted to know from the production side, what do you use and why?

View 1 Replies

VS 2008 Create Settings (user.config File) On App First Run?

Jul 16, 2009

I know that when using my.settings that when I exit my app that it saves them and then next reload it imports my.settings back.

My question, is there a way to create this user.config file on the apps first load?

View 3 Replies

.net - Automatically "upgrade" User Settings From Previous Version Of App.config File?

Jul 29, 2009

Every time I compile my app and the version number changes (I have an auto-incrementing build number), I lose the user-configured app.config settings, since they're stored in the AppData folder for a specific version. Essentially, every release of my application starts from scratch as far as user settings go.

While this is a mild annoyance in development, it raises the question as I approach deployment/release - if I use the app.config to store my user settings, will the user's personalized settings be hosed every time they install a patch that changes the version number of my app? If so, is there an easy way to "upgrade" the settings from the previous release? I know that using HKCU in the registry is another option, but I like the ease of the My.Settings namespace, and I'd like to stay with app.config.

View 2 Replies

User.config Location Keeps Moving?

Nov 25, 2009

I've just started using user settings. This works ok however I'm having problems with the location of user.config.

When I run the project in Studio, user.config seems to be stored in a different place than when I build the project.

In fact every time I build it the location seems to change - users therefore lose their settings every time the project is built, which seems pretty useless.

The GUID & Assembly names etc do not change.

View 2 Replies

VS 2008 Getting The User.Config Location?

Sep 1, 2009

the My.Settings data is saved in the AppDataLocal folder for a user based on company.Then, inside the company folder there will be a folder for any applications published by that company, which contain the user.config file for that program.

C:Documents and SettingsRobert BurkeLocal SettingsApplication DataSerysoftSysPad.exe_Url_qr40iotmbi1lvvl4b5lecnfpoqogr5uw

The thing is, the folder for each program has a string of random alphanumeric characters at the end. I noticed that on both my XP and Win7 machine, the string is the same. What I am wanting to do is save the user.config file, but the only way to do this, seemingly, would be to hardcode that folder into the path to get the user.config file from.

how that string is generated, and what may possibly cause it to change in other releases even though, so far, it has stayed the same for several of my releases. I don't want to release a version one day and the string change and then it break my program.

View 10 Replies

VS 2008 Settings Are Read From App.config Instead Of Settings-file

Oct 30, 2009

I have created a settings-file for my plug-in-based app. When the mainApp writes the settings to the file, the pluginApp should read the settings from the settings-file (when opening or at runtime even better), but somehow it reads the settings from the app.config-file. This means that the pluginApp never will read the settings according the values of the file.

View 4 Replies

Change The My.Settings Location?

Jan 10, 2011

I wanted to know is it posible to change My.Settings location.. for example, not in user folder (dont remember in witch folder, but i know it was in some users folder..), but save in application folder?Cos i write programs portable, so they work if the folder with my program is moved even to different PC..It would be a great if i could use my.settings and store in the application path..Cos i have tried to save in registry, xml file, ini file, and they all are pain in the a*s..

View 4 Replies

.net - Moving App.config File To A Custom Location?

Jan 25, 2011

My application is a service application, and it needs to load a set of configuration that the user can change. I was using the System.Configuration classes to set up the app.config file, and then I was going to give the user the option of editing this file to change configuration.

Can I move this file to a custom directory, something like C:settingsapp.config? Or is it forced to reside in the app directory?

View 2 Replies

Move The App.config File To A Custom Location?

Nov 27, 2011

I have an application that has a load of values in its app.exe.config file. The application is used by a few users, and the settings would change on a regular basis. so im having to change the config file, and send it out to all users.

I'd love to move the config file to the network somewhere and point the app to this file. ive tried to use;

Imports System.Configuration.ConfigurationManager
OpenExeConfiguration("I:app configHelpDeskQuickCallLogger.exe.config")

But i cant get it to read in the values.

View 2 Replies

Location Of App.config File In A Windows Service Project?

Feb 2, 2012

I am creating a windows service in VS2010, and in order to store a user's input during installation I've been told to write it to a file called app.config.However i cannot find this app.config file? Does it create one in a windows service project? or just in a WCF windows service project?

View 1 Replies

.net - Read A Settings Value From The Web.config File In An ASP.NET Application?

Aug 18, 2010

I'm trying to use the following command:

Dim xmlFilePath As String = _
System.Configuration.ConfigurationManager.AppSettings("XmlFilePath")

to retrieve the following setting:

<applicationSettings>
<MySolution.WebProject.My.MySettings>
<setting name="XmlFilePath" serializeAs="String">

[Code]....

However, xmlFilePath shows up as Nothing after that line of code is run.

What's the correct code to get a setting out of the web.config file in an ASP.NET application?

NOTE: Although you can add keys individually to the <appsettings> tag, I'm trying to figure out how to use it with the "Settings" tab in the project's properties.

View 2 Replies

How To Put Application Settings In An External App.config File Using V

Mar 10, 2009

I have been searching and posting regarding this problem and have found nothing to aid me. Discussion is either on web.config files or deal only with external files for connection strings or earlier versions of vb.net not 2008.I have already successfully put connection strings into an external config file, but trying the same approach with application settings has failed.There are two sections of the app.config involved with application settings.

1. the configuration and config sections at the top of the config. file where the section group and the section name are described.

2. the actually data for the application settings by section group section name which appears in the body of the configuraton section of the app.config.[code]

View 5 Replies

Re-load The My.settings Values From The Config File?

Nov 29, 2009

I would like to tweak some of the numbers in the app.exe.config file while the program is running. I would like my program to re-load those valued from the edited txt file.

I have tried my.settings.reset, reload, and upgrade. None of these seem to reload the values from the config file into the program

vs 2005
vb.net

How can i get my program to re-read the config file into its memory once it is up and running. say when a button is clicked?

View 4 Replies

VS 2008 Nested Settings In Config File?

Apr 18, 2012

I am writing an application that will be used to extract information from any one of three different database applications, depending on the option selected. I would also like it to be possible to run it against one of several environments (e.g. development, test or live).

I plan to hold the relevant logon details (in encrypted form, of course) in the app.config file, with the appropriate details selected depending on the environment and application. Rather than have each option hard-coded into a Select Case statement, I want to be able to nest the variables in the app.config. I had envisaged a section of the config file looking like this:

[Code]...

View 7 Replies

Way To Read Settings Of An App.exe.config File From A Linked Dll?

Sep 14, 2010

Is there a simple way to read from the global application.exe.config file from a dll?urrently I am loading the file as an XmlDocument but I wonder if there is a better solution.That's what I mean:If I create a new WinForms Project I have a Settings Tab in the Project properties where I can add some simple values (And I want to access the per Application settings, not the user beased ones).From my code I can access these values with:

Console.WriteLine(Properties.Settings.Default.SomeValue);

The Settings class is autogenerated in the file Settings.Designer.cs.Now I have the case where a dll need's to read the settings from the Main Application's config file. Is there a simple way to achive this? Currently I am reading the file as an XML Document.

View 2 Replies

VS 2010 - Easiest Way To Save Settings To Config File?

Mar 23, 2011

Is there a really simple way to save the app.config file to a location then load it again? I'm making a multiclient app. I was planning on having each user have a folder, and in that folder would be their personalized app.config file that would load when they log in. I don't really know any XML.

View 13 Replies

Asp.net - Getting Configuration Settings From Web.config/app.config Using Class Library

Mar 26, 2009

I have a class library (Named ADI), that needs some configuration settings from the project using it (like connectionstring, filesystem locations etc).

I want to define these settings in my Windows Forms/Web Projects App.Config or Web.Config, like other settings.

Here is part of my app.config for my windows forms application:

<applicationSettings>
<PhotoImportRobot.My.MySettings>
<setting name="ADIImageRoot" serializeAs="String">

[Code]....

View 3 Replies

VS 2010 - My.Settings - Can't Find File Which Reflects Changes To User Settings

Apr 15, 2011

1. I can't find the file which reflects changes to user settings. This might be because I just can't find it (I can see a bunch of user.config files but they are all empty - weird!), or...

2. I'm not actually saving them when I think I am.

Regarding 2. - do I need to invoke

Is this all I need? And if so, why are my user.configs empty?

View 1 Replies

Unrecognized Attribute 'configProtectionProvider' When Trying To Access Settings After Encryption Of Config File?

Dec 19, 2011

I recently changed application settings to be in an encrypted config file.The first time I run any application and try to retrieve a setting (My.settings. ...) from the config file I get an Unrecognized attribute 'configProtectionProvider'If I restart the application I don't get an error due to the fact that it doesn't re-encrypt during that run. Why when I run the application for the first time am I getting this error?

I am encrypting the config file on application startup using the following code:

[Code]...

View 1 Replies

User Change Link Name And Location?

Oct 15, 2011

I am trying to write a program where a user of my app can change the link location and label name.

At work we have testing scenarios that change at different locations, and instead of me sending updates every week, allow the user to update the link and label name by appending a file or db to pull the information?

View 1 Replies

Specifiy A Custom Location For The Settings File?

Jun 4, 2010

I would like to be able to specify exactly where the My.Settings file gets saved. It bugs me how it gets saved off in the middle of appsettings nowhere, and I would prefer it gets saved where the executable is. If anyone knows how to do this, that would be great. (P.S; I'm using VB.Net.)

View 14 Replies

VS 2008 - Saving Settings For File Location?

Dec 21, 2010

When I save settings for an application using My.Settings.Save it saves it in %AppData%LocalCompanyname. Because I don't want my app to be installed and I want it to be a just .exe file, and it leaves some files on that computer. I like it to be in my apps location. Can I change that default location?

View 4 Replies

Change User Settings In ClickOnce Deployment?

Apr 27, 2010

I have a program, written in VB 2008, that I deplpoy in Terminal server, that has some user settings (scope: user) that I'd like to modify locally. By default the user settings were not even installed locally. I think they are supposed to appear in the ClickOnce data directory. Using the following thread, I was able to get the user.settings installed locally:

[URL]

basically, i set my xml file as "Content" and I set the publish status as "Data File".

With this, my settings file appears in:

"C:Documents and SettingsusernameLocal SettingsApplication DataCompanyXYZProgramNameL.exe_Url_arzmal0maveh1nnwfib245pfk13xqfma1.0.0.0user.settings"

The problem is that modifying this file doesn't affect the application. I changed some settings, restarted the app, and changes were ignored.

View 1 Replies

Change Web Service URL In Exe.config File?

Jun 3, 2010

I have created a VB application with some web references created at design time. The URL property of each is set to Dynamic which has created a string value in My.Settings and in the app.config file.

During testing and debug the application uses one set of web services and when live it needs to use a different set of web references with a different URL. I thought I'd be able to change the values for these URL's in the MyApplication.exe.config file once installed on the PC but the application still sees the URL which was used to create the web reference at design time.

I've searched forums and this should be the way it works but I can't understand why it isn't picking up the URL for the web service from the exe.config file once I have installed the application.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved