Command line with parameter

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
DingDong
Newbie
Posts: 15
Joined: Tue May 11, 2010 11:28 am
Location: Canada

Command line with parameter

Post by DingDong » Tue May 18, 2010 2:16 pm

Hello,

Could someone help me to correct this piece of scripting.

The following won't work:

Code: Select all

RunProgram>C:\Desjardins\Suvriq\Suvriq.exe /SUVRIQ/REP:100/PROD:UL,1
But will work in Excel VBA, so I know the command line is OK:

Code: Select all

Sub ActivateMyLine()
Dim A

A = Shell("C:\Desjardins\Suvriq\Suvriq.exe /SUVRIQ /REP:100 /PROD:UL", 1)

End Sub
What am I doing wrong for this piece of scripting code.

Thank you!

User avatar
JRL
Automation Wizard
Posts: 3517
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue May 18, 2010 2:23 pm

try removing the ,1. that is improper command line syntax. You might also need to enclose the whole line in quotes as the VBA example shows, though I doubt it. Another possibility is the spaces between the slashed parameters in the VBA are not present in the runprogram line.

DingDong
Newbie
Posts: 15
Joined: Tue May 11, 2010 11:28 am
Location: Canada

Post by DingDong » Tue May 18, 2010 2:31 pm

Thank you JRL, the last parameter was the problem.

You just made my day, still in the am in Canada.

DingDing

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts