?
Solved

Adding and Parsing custom app.config files.

Posted on 2007-03-31
1
Medium Priority
?
200 Views
Last Modified: 2013-11-25
I am looking to create a vb.net service that runs applications (i.e. notepad, ie, etc) when it is stoped or started.  I want the application paths to be configurable via xml file (like app.config).

I can not figure out how to place the nodes in app.config and then parse them out in the OnStart sub.

My thoughts on the xml section are as follows

<OnStart>
 <app name="..." path="..." ExecOrder="1" />
 <app name="..." path="..." ExecOrder="2" />
 <app name="..." path="..." ExecOrder="3" />
</OnStart>
<OnStop>
 <app name="..." path="..." ExecOrder="1" />
 <app name="..." path="..." ExecOrder="2" />
 <app name="..." path="..." ExecOrder="3" />
</OnStop>


 Protected Overrides Sub OnStart(ByVal args() As String)
 
  For Each Node in OnStart
        System.Diagnostics.Process.Start("Path")
  Next

 End Sub
0
Comment
Question by:makman111
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 19

Accepted Solution

by:
Rimvis earned 2000 total points
ID: 18834894
I suggest you place your settings in separate XML file.
Take a look here:
http://www.codeproject.com/vb/net/parsefilecode.asp
0

Featured Post

Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Progress
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question