English

Error: {path to executable file}" does not contain a valid path

Error Message

ArcView returns this error when running an Avenue script that contains the System.Execute request:

"{path to executable file}" does not contain a valid path

Cause

This error is caused by sending an argument to the application from the System.Execute request encased in an extra set of double quotes. For example:

arg1 = "c:\temp\test.exe /0"
arg2 = arg1.quote
System.Execute(arg2)

Solution or Workaround

  • Option 1: Remove the '0' argument:

    Code:
    arg1 = "c:\temp\test.exe"
    arg2 = arg1.quote
    System.Execute(arg2)

  • Option 2: Remove the extra quotes:

    Code:
    arg1 = "c:\temp\test.exe /0"
    System.Execute(arg1)

    Note:
    Change the path in the sample to the actual path of an executable that resides on your computer.