Link to home
Start Free TrialLog in
Avatar of David11011
David11011Flag for United States of America

asked on

Editing a VB.net Config file

I created a VB.net app using Visual Studio 2008. I've been programming in VB asp.net for years and thought that I would try my hand at a simple application to sort some of the archived emails on our server.

I created the application with a config file with the thought that I would then be able to use the application on serveral different servers that store the archived files in different locations without having to recompile the program for each server.

When I publish the application it makes a setup.exe which is foreign to me. I guess that Microsoft eliminated standard MSI packages and now has a "click once" installer package. Well now that I'm done giving you some history on my situation here is my problem.

When I install the app on the server it puts the files in the frustratingly buried location of "C:\Documents and Settings\admin\Local Settings\Apps\2.0\2H69XTWK.OHX\QW0E6L41.5N1\dele..tion_4ebea5cbbf70dc46_0001.0000_9b33683a71325b11". If there is a way to change the install location please let me know.

 I found the config file and the executable and the config file in the same folder:
DeleteOldSpamArchives.exe
DeleteOldSpamArchives.exe.config
When I try and edit the config file to point the application to correct path for the archived files it still uses the old path that it was originally compiled with. Am I editing the wrong file?
ASKER CERTIFIED SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of David11011

ASKER

Thanks for this info on MSI installer.

I discovered that I am able to edit the configuration file with a text editor after the application is compiled and installed.

The problem with my application was that I created the config file as an after thought after I already completed the app and when I was pointing my variables to the config file I missed one and it's value was still set within the vb code. The application's ability to load is dependent upon this variable so all I saw was an error upon loading the program and assumed that the values in the app were not changing when I modified the config file.

It was more of an ID10T error than anything.