TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jennifer Logam
NA
2
0
Changing config infor in a program during the installation
Apr 3 2006 11:57 AM
Hi guys, this is a tough one. I'm trying to ask the user to input data that I will use to input in the configuration file during the installation process. So what I did was to create a small test application. In the first form (app1), I simply print out the contents of the configuration file. Then I added a new project to that one (app2), and in that project, I created a simple interface to input one parameter from the user and write that parameter to the configuration file. The line of code that i used to write to the configuration file is: WriteDoc.Save(@"App.config"); Then I created the installation program, added the primary output and source content of both app1 and app2. After it was created, I went to the custom action of the set up, and added the project app2 in the install custom action. I selected the property installer class to be false. This will run the application during the set up installation. All of this is working properly. The app2 is running during the installation. However one problem. When I'm writing to the file App.config, it's not reading the file from the directory that the user selected during the installation process but rather from this directory: c:/windows/system32. I guess this is some default directory. I do not quite understand it. So app2 is supposed to update the configuration file from app1. Both of these source files are being copied to the same directory that the user selects. How could I read that directory that the user selects during the installation setup program? In other words, app2 must write to App.Config which is located in: DirectoryUserSelected/App.Config How could I find out this directory that the user selected so I could specify it in app2 as the path to write to? Is this even possible??? Jennifer
Reply
Answers (
0
)
Update Form From Wizard
Managed Callback from WinAPI: Problem with unicode string