473,396 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to set up .exe.config during installation

So I've been really good. I've written my nice shiny new app to use a
..config file.

I have code that is nicely reading (and updating as required) the settings
in the .config file, and the app is passing testing, fine.

All goes well, right up to the point where I want to make the install script
set up the initial values in the config file, based on part of the
installation script values and text box values from a form in the install
script.

And can I find out how to do it?

Nope. Not at all.
Jul 21 '05 #1
2 1913
hi....

for reading the values from the install program, i guess u must have added
custom forms to ur install app from the setup project, in this case u have to
create a custom installer class to read the values from the installer
application and do the required job, once u have created ur installer class u
need to add this dll file as a custom action to the installer,
so when the installer runs, the code in the installer class also gets
executed.

you need to pass the parameters thro the custom action data property in the
setup app.
Ex. - /INSTALLDIR="[INSTALLDIR]"
and inside the installer class you can read the parameters as shown below.
Console.WriteLine(Context.Parameters["INSTALLDIR"].ToString());

check out these links for further reading.
http://www.c-sharpcorner.com/Code/20...nstClasses.asp

http://msdn.microsoft.com/library/de...classtopic.asp

hope this helps,
Bye

Kannan.V
http://kannanv.blogspot.com
"policywatcher" wrote:
So I've been really good. I've written my nice shiny new app to use a
.config file.

I have code that is nicely reading (and updating as required) the settings
in the .config file, and the app is passing testing, fine.

All goes well, right up to the point where I want to make the install script
set up the initial values in the config file, based on part of the
installation script values and text box values from a form in the install
script.

And can I find out how to do it?

Nope. Not at all.

Jul 21 '05 #2
Gotcha. Many thanks.

"DesignedForDOTNET" wrote:
hi....

for reading the values from the install program, i guess u must have added
custom forms to ur install app from the setup project, in this case u have to
create a custom installer class to read the values from the installer
application and do the required job, once u have created ur installer class u
need to add this dll file as a custom action to the installer,
so when the installer runs, the code in the installer class also gets
executed.

you need to pass the parameters thro the custom action data property in the
setup app.
Ex. - /INSTALLDIR="[INSTALLDIR]"
and inside the installer class you can read the parameters as shown below.
Console.WriteLine(Context.Parameters["INSTALLDIR"].ToString());

check out these links for further reading.
http://www.c-sharpcorner.com/Code/20...nstClasses.asp

http://msdn.microsoft.com/library/de...classtopic.asp

hope this helps,
Bye

Kannan.V
http://kannanv.blogspot.com
"policywatcher" wrote:
So I've been really good. I've written my nice shiny new app to use a
.config file.

I have code that is nicely reading (and updating as required) the settings
in the .config file, and the app is passing testing, fine.

All goes well, right up to the point where I want to make the install script
set up the initial values in the config file, based on part of the
installation script values and text box values from a form in the install
script.

And can I find out how to do it?

Nope. Not at all.

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Captain Obvious | last post by:
I'm posting this in hopes that it will help a few folks out when the search Google Groups. I was having the following problems with Oracle 10G: 1. When installing the database, the net config...
0
by: Bob Willer | last post by:
I have a .NET Installer class that gets executed during my installation. However, that installer class is reliant on an associated .config file. So I have "MyClass.dll" that is a .NET Installer...
1
by: Tim Marsden | last post by:
Hi, How do I modify the app.config file for my application during install. The file is not available when using a helper class or custom action program until after the install? Tim
2
by: KennethBohman | last post by:
Hi everybody, Question: how can I use the executable.config-files during installation? The answer might seem obvious, but there is apparently more to it! My itention was, as part of the...
1
by: Rajesh Abraham | last post by:
I would like to Exclude MyApp.Exe.Config from my Setup Package as I don't want it to get overwritten during upgrade installation of my application. If I remove app.config while building the...
16
by: Frank Oquendo | last post by:
ConfigurationSettings.AppSettings allows me to read from my config but how do I write to my config file? -- There are 10 kinds of people. Those who understand binary and those who don't. ...
2
by: policywatcher | last post by:
So I've been really good. I've written my nice shiny new app to use a ..config file. I have code that is nicely reading (and updating as required) the settings in the .config file, and the app...
0
by: Nenad Dobrilovic | last post by:
Hi all, I have a really strange situation, but I believe that there is someone else who has already experinced the same, and is willing to help me! I made an application using VS 2005 in C#,...
1
by: bogdan.taru | last post by:
Hello, I have had a lot of problems installing a DB2 v8.1 Personal Edition on a RHEL4. Solved most of them by using a JDK-1.4.1 instead of the default 1.3.1, which comes with DB2. But I still...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.