David11011
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\QW0E6 L41.5N1\de le..tion_4 ebea5cbbf7 0dc46_0001 .0000_9b33 683a71325b 11". 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?
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
I found the config file and the executable and the config file in the same folder:
DeleteOldSpamArchives.exe
DeleteOldSpamArchives.exe.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.