473,698 Members | 2,609 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

modifing app.config file during installation

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
Jul 21 '05 #1
1 1828
Hello Tim,

Thanks for posting, if you are working with VS.Net Setup project and
managed .Net custom actions, the App.config file should already been
installed when the custom action is run.

Please note that we the installer class is executed, the current working
directory is "C:\windows\sys tem32". So you may need to path the target
installation path as the "CustomActionDa ta" into the installer class.
Please refer to the following links:

CustomActionDat a Property
http://msdn.microsoft.com/library/de...us/vsintro7/ht
ml/vxgrfcustomacti ondataproperty. asp?frame=true

Walkthrough: Passing Data to a Custom Action
http://msdn.microsoft.com/library/de...us/vsintro7/ht
ml/vxwlkwalkthroug hpassingdatatoc ustomaction.asp ?frame=true

We can use the following as the "CustomActionDa ta" for the custom action:

/name="[TARGETDIR]\".

I hope this helps.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #2

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

Similar topics

0
873
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 class. I also have a file "MyClass.dll.config" that is deployed into the same destination directory. By doing some testing and using reflection, I have confirmed that the ExecutingAssembly is "MyClass.dll", and it is executing in the directory...
2
1945
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 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...
2
1758
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 iinstallation, to write write two settings to the .config file for the executable. I don't usually do that, but for such a small application I thought it would be alright. I created a simple Install class, added an override for the Install
1
5477
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 setup, it removes existing app.config on the target machines and if included, it overwrites the existing ones. I tried editing the msi package and removing the app.config file from the table but it did not work. Any
0
328
by: Ravikanth[MVP] | last post by:
Hi Use Server Variables to get full path. Server Variable i s :APPL_PHYSICAL_PATH Ravikanth >-----Original Message-----
1
319
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
0
1223
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#, which uses one setting from *.exe.config file with 'user' scope. That is a server address, for example. I wanted to setup that parameter during installation. So, I included one additonal step during installation which collects a server address...
3
10596
by: Blasting Cap | last post by:
I am working on a web app that I want to be able to use a separate config file on, in addition to the web.config file that's already working in the application. If I put the following in the web.config file (VS 2005, Framework 2.0), I can retrieve the values fine: <appSettings> <add key="fileInputFolder" value="C:\National City Downloads\test"/> <add key="fileTransaction" value="\Transactions\"/>
1
3768
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 have two problems, and I think they have something in common: 1) an instance was created during the installation. I am trying to add a new instance by using: "/opt/IBM/db2/V8.1/instance/db2icrt -d -a server -s ese -u db2fenc1 db2inst2", and this...
0
8676
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8898
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3051
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.