Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C#
I create a installer (setup) for my WM application. The purpose of this installer is to allow user to enter a server URL and save it to the app config file. Here is what I have done:
1) Add "Textboxes (A)" below the "Welcome" folder
2) In the custom installer project, add the following code to "Install" event. There is no error but the config file does not get updated.
Question - what is the proper way to get this done? Thank you in advance!
// code block:
public override void Install(IDictionary stateSaver)
    // Just to test whether this get executed, I use a temp text file
    // but it does not get created.
            // save user input
            string sUserInput = this.Context.Parameters["EDITA1"];
            string TEMP_FILE = @"tempFile.txt";
            // installPath has the correct value from Registry
            string sUserInputFile = Path.Combine(installPath, TEMP_FILE);
            StreamWriter oURLWriter = File.CreateText(sUserInputFile);
            oURLWriter.WriteLine("end of user input");

    // It seems to complete the installation with the following okay:
    // Get the path to ceappmgr.exe, ini file and pass them to
    // System.Diagnostics.Process.Start(...)

[edit]code block added[/edit]
Posted 18-Dec-12 12:09pm
Edited 18-Dec-12 12:36pm
Nelek at 18-Dec-12 18:39pm
Just for your information, when you are composing a message you can select your code block and use the widget "code" at the tool bar of the edit board, it will open a list where you can choose the most adecuated language for your code snippet. So it will appear formated and with colors that make it easier to read. I have done it for you. If you need to change/add anything, please use the widget "improve question" in the low right corner of your question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
0 Shai Vashdi 319
1 OriginalGriff 280
2 Sergey Alexandrovich Kryukov 250
3 Peter Leow 171
4 Abhinav S 168
0 Sergey Alexandrovich Kryukov 8,944
1 OriginalGriff 5,280
2 Peter Leow 3,985
3 Maciej Los 3,535
4 Abhinav S 3,218

Advertise | Privacy | Mobile
Web02 | 2.8.140415.2 | Last Updated 18 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid