Batch to VB App

The following command and arguments run without any errors if they are run in a batch file.

"C:\Program Files (x86)\Visual CUT 11\Visual CUT.exe" -e "C:\test_3\People_1.rpt" "Export_Format:Adobe Acrobat (pdf)" "Export_File:C:\test_3\People_1.pdf"

Open in new window

However, Visual Cut returns an error when the code shown below is run. The code runs in Visual Studio without any errors.

Batch File:
"C:\Program Files (x86)\Visual CUT 11\Visual CUT.exe" -e "C:\test_3\People_1.rpt” "Export_Format:Adobe Acrobat (pdf)" "Export_File:C:\test_3\People_1.pdf"

Open in new window

VB App:
        Dim retval As String
        Dim ls_temp As String
        ls_temp = "C:\Program Files (x86)\Visual CUT 11\Visual CUT.exe " & _
"-e ""C:\test_3\People_1.rpt "" ""Export_Format:Adobe Acrobat (pdf) "" ""Export_File:C:\test_3\People_1.pdf"""
        retval = Shell(ls_temp)

Open in new window

Visual Cut Error:
[C:\test_3\People_1.rpt ]: Requested Export Format (Not recognized) is not Supported.: 1/24/2018 3:04:17 PM

The batch, Visual Cut and VS are on the same machine. I've checked the paths several times. I am the admin user.

Please help me find the error.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ls_temp = """C:\Program Files (x86)\Visual CUT 11\Visual CUT.exe"" " & _
"-e ""C:\test_3\People_1.rpt"" ""Export_Format:Adobe Acrobat (pdf)"" ""Export_File:C:\test_3\People_1.pdf"""

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mark01Author Commented:
It worked, Kimputer! Thank you. Can you resolve the Process class error:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.