I would try to stay away from using the registry and or
ini files, and stick with XML or the app.config files.
For your problem how about having the default connections
for say the production system stored in the app config
file. and when the system is run from the command line
over ride the app.config files in the program.
For example the Test server is called test01 and
production is prod01. In the config file you would have
the database connection string connecting to the prod01
machine. then when the app runs with no command line args
it would use the prod01 machine. Now in the code
configure it to check if command line args were passed,
if they validate then override the reading of the
app.config and use command line args.
Glenn Wilson
>-----Original Message-----
>you can you .INI files. More details
>http://www.crtimmonsinc.com/Frontend...p/DesktopDefau
lt
>..aspx?tabid=1015.
>
>>-----Original Message-----
>>Dear All,
>>
>>We have a number of vb6 applications that are executed
>with command
>>line parameters to indicate the connection string to
>use. This is
>>obviously helpful since we can have one icon/zenworks
>snapshot that
>>lauches the training version and another that runs the
>live version.
>>In both cases the same executable is used - just
>difference
>>command-line arguments.
>>
>>I have recently come across the app.config file with
>vb.net and have a
>>basic understanding of what it's used for.
>>
>>Can someone please recommend me a technique to
implement
>the vb6
>>functionality above without having to pass command-line
>arguments? or
>>would two setup projects be required, with two
different
>app.config
>>files - one pointing to our training db and the other
the
>production
>>db.
>>
>>Many Thanks in advance,
>>
>>Jan-Willem Wilson.
>>.
>>
>.
>