When you compile your application you get a config file with the name of exe
file and config as extension (assuming you have added app.config in your
project). now you can have 2 files wiht different settings e.g.
1- application.exe .config
2- application.exe .config.notinus e
now when you have to use config file #2 then you can change the name of #1
to something like application.exe .config.notinus enow and you can change the
#2 as application.exe .config
now when you will run your application #2 config file will be used.
other way could be that you read second config file (which is nothing more
than xml file) and using xml features in language you can read the tags and
values. little involved process but might work for the settings you are
needing.
just wondering, what is the diff between two files youhave?
"yaron" <ya***@discussi ons.microsoft.c om> wrote in message
news:82******** *************** ***********@mic rosoft.com...
don't understand you, please give an example for your solution.
Thanks.
"Pohihihi" wrote:
no you can't do that. but what you can do is that you can change the name
of
config file to run with another config file.
"yaron" <ya***@discussi ons.microsoft.c om> wrote in message
news:32******** *************** ***********@mic rosoft.com... >i don't know how to run myApp.exe once with file1.config and once with
> file2.config as the configuration file (without copying file1.config or
> file2.config to myApp.exe.confi g).
>
>
> "Pohihihi" wrote:
>
>> if you are asking about command parameter value then use %1 as
>> variable.
>>
>> I could not get teh correct link but this link do have some examples
>> that
>> will give you some idea.
>>
>> http://www.microsoft.com/technet/arc...ain/batch.mspx
>>
>>
>> "yaron" <ya***@discussi ons.microsoft.c om> wrote in message
>> news:33******** *************** ***********@mic rosoft.com...
>> > Hi all,
>> >
>> > I want to give a sample console application for the user with 2
>> > configuration files.
>> > I want to give also a 2 .bat files for running the sample
>> > application,
>> > one
>> > for each configuration file.
>> > How can i choose in the .bat file which configuration file to use ?
>> > (something like myApp.exe -D file1.config).
>> >
>> > Thanks.
>> >
>>
>>
>>