DOS command in VB.net and WPF
Hi,
Would you know how I do pass a command line with WPF?
In WindowsForm I used
Shell("cmd.exe /c mame -listxml >xmlout.xml", 0, True)
(the app. Name and parameters, show/hide window, wait or not for the task being completed)
Unfortunately this line doens't work anymore in WPF
What should I use to send a command line with parameters?
Thanks very much for any kind help ;-)
Re: DOS command in VB.net and WPF
Use Process.Start() method and pass the appropriate arguments/parameters.
Refer to this link:
http://msdn.microsoft.com/en-us/library/53ezey2s.aspx
Re: DOS command in VB.net and WPF
Re: DOS command in VB.net and WPF
For the one interrested in:
Dim myProcess As New Process()
myProcess.StartInfo.FileName = "mame.exe"
myProcess.StartInfo.Arguments = " " & displayArray(masterIndex).rom & " -volume -" & My.Settings.mame_volume & " -skip_gameinfo"
myProcess.Start()
myProcess.WaitForExit()
myProcess.Close()