Results 1 to 1 of 1

Thread: RESOLVED-Spaces in command line dir path not working after vs2003 to vs2005

  1. #1

    Thread Starter
    Hyperactive Member gtilles's Avatar
    Join Date
    Dec 2004
    Location
    Planet Earth
    Posts
    394

    Resolved RESOLVED-Spaces in command line dir path not working after vs2003 to vs2005

    The code below previously worked in vs2003, we converted to vs2005 and now I notice that the application "CSDiff" does not like the fact that the arguments have a space in the path, ie:This Dir
    It returns an "illegal command line" error
    If I change the path to one that has no space in the dir name it works fine.
    In vs2003 it worked fine with the space.
    I need to use the temp dir to read and put my files.

    Code:
     
     Dim myCommandLine As String = ""
     myCommandLine = "/Ohc:\myDir\This Dir\myReport.html /qc:\myDir\This Dir\myInput1.html c:\myDir\This Dir\myInput2.html"
                   
    Dim myProcess As New System.Diagnostics.ProcessStartInfo
                    myProcess.Arguments = myCommandLine
                    myProcess.FileName = Application.StartupPath & "\CSDiff.exe"
                    System.Diagnostics.Process.Start(myProcess).WaitForExit(400)


    RESOLVED_I just added chr(34) to my commandline
    Last edited by Hack; Sep 25th, 2007 at 06:19 AM. Reason: Last edited by gtilles : Yesterday at 02:58 PM. Reason: RESOLVED
    Truly, you have a dizzying intellect.

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