Solved

Adding and Parsing custom app.config files.

Posted on 2007-03-31
1
194 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 500 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This is about my first experience with programming Arduino.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

730 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