473,406 Members | 2,705 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,406 software developers and data experts.

Sharing config file between two exes?

Hi,
I have two exe-files, named Test1.exe and Test2.exe that are located in the
same directory. Now I want these two exe to share the same config file. Can
this be done?

Since I created Test1.exe first, I have a file named Test1.exe.config. Can
this be used by Test2.exe?

Thanks,

Mats-Lennart
May 16 '06 #1
4 1979
I'm not aware if it's only possible to point out other config file (seems
that it isn't possible), but you can set the postbuild event in VS to make a
copy of existed config with new name.
Hi,
I have two exe-files, named Test1.exe and Test2.exe that are located in the
same directory. Now I want these two exe to share the same config file. Can
this be done?

Since I created Test1.exe first, I have a file named Test1.exe.config. Can
this be used by Test2.exe?


--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

May 16 '06 #2
Adding to my previos post, you certainly can use System.Xml namespace to read
that config file

"Jonny" wrote:
Hi,
I have two exe-files, named Test1.exe and Test2.exe that are located in the
same directory. Now I want these two exe to share the same config file. Can
this be done?

Since I created Test1.exe first, I have a file named Test1.exe.config. Can
this be used by Test2.exe?


--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

May 16 '06 #3
you can share single .config file between two applications but not that
easy.
you must write custom code to read properties

You can use System.Xml namespace as Michael Nemtsev wrote

hope ths helps
Galin Iliev[MCSD.NET]
www.galcho.com

May 16 '06 #4
The AppDomain class has a ConfigFileName property but then you would need to
get into custom code to load the assembly and so on.

The default behavior for an exe is to load a config file with the same name
as the executable plus ".config"
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Jonny" wrote:
Hi,
I have two exe-files, named Test1.exe and Test2.exe that are located in the
same directory. Now I want these two exe to share the same config file. Can
this be done?

Since I created Test1.exe first, I have a file named Test1.exe.config. Can
this be used by Test2.exe?

Thanks,

Mats-Lennart

May 16 '06 #5

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

Similar topics

3
by: Mustaq | last post by:
Hi, How to read same config file from different application? I have 4 application in VB.NET, all are using different app.config files. NOW I need all to read only one config file, how can I do...
6
by: Vai2000 | last post by:
Hi All, I have created a COM+ Component Foo.dll, I was wondering where I can store its Config File and what should I name it? this COM+ Component calls a WebSvc too! the IDE Created an app.config...
5
by: BPearson | last post by:
Hello I would like to have several sites share a single web.config file. To accomplish this, I would point the root of these sites to the same folder. Is there any reason why I might not want to...
5
by: Eric Sabine | last post by:
This situation requres many exes to be sitting on a network share. I would like all of these to use the same app.config file, which will be stored in the same location on the network. A quick...
5
by: source | last post by:
I have two exes and would like to share a simple boolean variable among two exes. The client will setup the value for hte boolean while the server will read it.How do I do that? I have a...
8
by: aabdis | last post by:
Hello All.... I have a question... i have two Windows apps (one UI, and one service) which use a common DLL that hands out database results and such to the two apps. The DLL always connects to...
8
by: mc | last post by:
I would like to be able to send from an ASP.NET page an email which when recieved takes the form of a "Sharing Invitation for a RSS Feed"...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.