CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Posts
    19

    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 ;-)

  2. #2
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    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
    Regards,
    MMH
    Rate my post if you find it usefull.

  3. #3
    Join Date
    Apr 2011
    Posts
    19

    Re: DOS command in VB.net and WPF

    Thank you, it's perfect!

  4. #4
    Join Date
    Apr 2011
    Posts
    19

    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()

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured