Solved

Adding and Parsing custom app.config files.

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This is about my first experience with programming Arduino.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

705 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now