Hello
Well.. for a few days ago i started to program in c# else i havent really got any exp. So please Sorry for my questions..
The problem is. That i wantet to make a windows form aplicationg and in there i want to make a button that when it got pressed It starts a program that you intered the path of in a XML file or something else .file
Exemple.
I go to c://example.XML and in there i find line 3 that is called path: In there i inset path:c://windows/notepad.exe
Then when i go to the program and press button 1. It starts Notepad.exe
The meaning of this is that i want to make a Launcher to a program i made.
Well i hope you guys can help me.
/zavis Thanks
How do i make a XML file that C# Is readingHow do i make a XML file that C# is reading to open a .exe file
Page 1 of 1
2 Replies - 1546 Views - Last Post: 11 July 2010 - 06:12 AM
Replies To: How do i make a XML file that C# Is reading
#2
Re: How do i make a XML file that C# Is reading
Posted 11 July 2010 - 05:55 AM
#3
Re: How do i make a XML file that C# Is reading
Posted 11 July 2010 - 06:12 AM
So you want to make a XML file which stores file paths to various applications binary?
Should be pretty easy. Look into using the xDocument class to load your XML file, use a linq query or Xdocument.Descendants. Finally use the StartProcess class and pass the filepath as a parameter, you'll need the following namespaces.
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using System.Diagnostics;
I know that might be a little vague, but look at the tutorial posted above and use Google, for example 'XDocument reading a xml file', 'starting a process c sharp' etc
Feel free to post your attempt, I'm sure people will be happy to guide you.
Should be pretty easy. Look into using the xDocument class to load your XML file, use a linq query or Xdocument.Descendants. Finally use the StartProcess class and pass the filepath as a parameter, you'll need the following namespaces.
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using System.Diagnostics;
I know that might be a little vague, but look at the tutorial posted above and use Google, for example 'XDocument reading a xml file', 'starting a process c sharp' etc
Feel free to post your attempt, I'm sure people will be happy to guide you.
This post has been edited by Bacanze: 11 July 2010 - 06:13 AM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|