You are here: More... > Run a script from the command line

Run a script from the command line

When you run a Studio for Salesforce script from the command line, you can pass script commands as switches.

Syntax

To run scripts from the command line, use the following syntax:

"<path>\Winshuttle.Salesforce.console.exe" –switch1Name[Switch1Value] –switch2Name[Switch2Value]

Be sure that there is a single space between "<path>\Winshuttle.Salesforce.console.exe" and the first switch.

Switch name and description

-run ' Script file name

-aln ' Autologon name to use

-rfn ' Excel data file name

-drs ' Excel data sheet name

-dce ' Close Excel at the end of the run

-drf ' Run Excel in the foreground, otherwise in the background

-dsr ' Data sheet Start Row

-der ' Data sheet End Row

-api ' "BULK" or "SOAP"

Examples

Run a Query script using script name and Autologon name

Winshuttle.Salesforce.Console.exe -run"D:\TestHarness\Acc_Query_singleSheet.stx" -drf -alnDev_Acc

Run a script with a specific Excel data file and sheet name

Winshuttle.Salesforce.Console.exe -run"D:\TestHarness\Acc_ Create _singleSheet.stx" -rfn"D:\TestHarness\Query_NewFile.xlsx" -drs"Sheet3" -alnDev_Acc -drf

Run a Query script in the foreground, close Excel after the run

Winshuttle.Salesforce.Console.exe -run"D:\TestHarness\Acc_Query_singleSheet.stx" -alnDev_Acc -drf -dce

Run using specific Start and End rows

Winshuttle.Salesforce.Console.exe -run"D:\TestHarness\Acc_ Create_singleSheet.stx" -alnDev_Acc -drf -drsQueryAccountData -dsr15 -der75

After you press Enter, the script runs from the command line:

script running from the command line