Application Configuration File

  • Thread starter Thread starter zurg
  • Start date Start date
Z

zurg

Hi!
I just started to gather some information about application configuration
file (myapp.exe.config and so one)
As I noticed it's a very useful way of "editing" my application without
re-compiling it
I learned a few things about this...
And I have a question:
Is there a way to, using configuration file, determine which parts of my
application should be started?
For example I have an application with function GetUserName,
ShowHelloMessage, GetComputerName
and I want to start this time only GetUserName and ShowHelloMessage... how
to do so?
Of course i can write inside the configuration an array a variable
CommandsToRun
then read this arrray and using case for each command in this array do so...
But is there a more "nice" way?

Any suggestions will be appriciated;)
zurg
 
Herfried,

Many thanks for the code, it seems to work on most things now but just one
quick question?
I`ve used the code below, but it tells me PC Anywhere has to be run from the
Data Directory, If i use a command prompt and cd to C:\Program
Files\Symantec\pcAnywhere, Then run AWHOST32.EXE LanHost.BHF it works fine.
Can I get VB to cd to a Directory then Run?

Heres the code Im Using

Dim StartPCAWLAN As New ProcessStartInfo()
StartPCAWLAN.FileName = "C:\Program
Files\Symantec\pcAnywhere\AWHOST32.EXE"
StartPCAWLAN.Arguments = "LanHost.BHF"
Process.Start(StartPCAWLAN)

Many Thanks
MCN
 
* "MadCrazyNewbie said:
I`ve used the code below, but it tells me PC Anywhere has to be run from the
Data Directory, If i use a command prompt and cd to C:\Program
Files\Symantec\pcAnywhere, Then run AWHOST32.EXE LanHost.BHF it works fine.
Can I get VB to cd to a Directory then Run?

Heres the code Im Using

Dim StartPCAWLAN As New ProcessStartInfo()
StartPCAWLAN.FileName = "C:\Program
Files\Symantec\pcAnywhere\AWHOST32.EXE"
StartPCAWLAN.Arguments = "LanHost.BHF"
Process.Start(StartPCAWLAN)

Try this (in addition to the code above):

\\\
StartPCAWLAN.WorkingDirectory = "C:\Program Files\Symantec\pcAnywhere"
Process.Start(...)
///
 
Back
Top