Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6754195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:15:04+00:00 2026-05-26T13:15:04+00:00

I have created a Setup Project for my Project. This project connects to a

  • 0

I have created a Setup Project for my Project. This project connects to a live DB server through asmx services. That URL will be determined after the client will deploy the web services on some server. So in setup project i have added a “TextBoxes” dialog in User Interface Editor section of the Setup Project where i have enabled only one TextBox to get the URL of the deployed Services. In my project i have added a file to be executed during Setup installation and i have defined it as follows:

[RunInstaller(true)]
public class InstallerHelper : System.Configuration.Install.Installer
{
    // Other Code also exists that is not needed to be shown here<br/>    
    //.....
    // The following method gets executed during setup installation
    public override void Install(IDictionary stateSaver)
    {
        try
        {
            base.Install(stateSaver);

            //Proceed only if the Context object has some parameters
            if (Context.Parameters.Count != 0 && !string.IsNullOrEmpty(Context.Parameters["WEBSITEURL"]))
            {
                //Get the installation Folder's Path
                string installationFolder = Context.Parameters["INSTALLFOLDER"];

               // Get the Site's URL entered by Client
                string websiteUrl = Context.Parameters["WEBSITEURL"];

               //Create different Key Value pairs based on entered URL
                string[][] keyValues = {
                                new string[] {"SiteUrl",websiteUrl},
                                new string[] {"WebServiceURL", websiteUrl + "Users.asmx" },
                                new string[] {"TicketsServiceURL", websiteUrl + "Tickets.asmx"},
                                new string[] {"CampaignsAndProjetcsServiceURL", websiteUrl + "CampaignsAndProjetcs.asmx"},
                                new string[] {"EntitiesURL", websiteUrl + "Entities.asmx"},
                                new string[] {"AccountsURL", websiteUrl + "Accounts.asmx"},
                                new string[] {"TransactionsURL", websiteUrl + "Transactions.asmx"},
                                new string[] {"RelatedReportsURL", websiteUrl + "RelatedReports.asmx"},
                                new string[] {"GiftAidsURL", websiteUrl + "GiftAids.asmx"}
                               };

                // Load the app.Config file and store these values in it.
                //********************************************

                string configFilePath = installationFolder + @"\MyProject.exe.config";
                XmlDocument configuration = new XmlDocument();

                // Load App.Config File
                configuration.Load(configFilePath);

                //Add the values in it
                Utility.UpdateValue(keyValues, configuration);

             //Save configuration File
                configuration.Save(configFilePath);
              //********************************************<br/>
            }
        }
        catch (Exception ex)
        {
            throw new InstallException("The following Error(s) occured during installation. \n " + ex.Message);
        }
    }

}

Here i Store the entered URL and some other generated URLs of different web services in App.Config of the Project to be used in Project for accessing data.

It works fine when i install a fresh copy of the Setup, but problem occurs when i try to Repair the installed project by again executing the Setup.exe file.

Repair process does not asks me to enter the URL again and also the Items stored in App.Config during first time installation are lost. So the whole application stops working.

Any help is greatly appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T13:15:04+00:00Added an answer on May 26, 2026 at 1:15 pm

    A good approach is to save this custom information somewhere and retrieve it during maintenance using searches:

    • create some string registry entries which contain your custom properties; the registry entry value can be something like:

      [WEBSITEURL]

    • create registry searches which read these entries and save them in your custom properties; for this use the property names for the actual searches

    This way a repair will read the property values from registry and restore your original properties.

    Both the Registry Editor and Launch Conditions Editor can be opened by selecting your setup project in Solution Explorer and clicking the appropriate button on its top pane.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created setup project in Visual Studio 2008. How do I run this
I have created a Pydev project following this layout: - project_root/ |- setup.py |-
I have created a setup project using Visual Studio 2008. After the application is
I have created a setup project in VS2008. My WinForms app uses .NET 2.0,
I'm using Visual Studio 2008 and have created a setup project for my application.
I have created a custom dialog for Visual Studio Setup Project using the steps
I have a setup project created by Visual Studio 2005, and consists of both
Currently, I have a project with a Windows Service. I also created another Setup
I've created some MbUnit Test Fixtures that have SetUp methods marked with the SetUp
I have created a setup project using Visual Studio 2008 . When installing on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.