RunTask.AddArgument
-------------------

Adds the argument that should be used to launch the executable to the arguments list.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [RunTask](component_RunTask.md) | [4.1](newinversion41.md) | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ❌ No |

### Deprecated

This function was [deprecated](deprecated.md). Use [Shell](component_Shell.md) functions instead.

MBS( "RunTask.AddArgument"; argument ) 

**MBS**( **"RunTask.AddArgument";** /\* Adds the argument that should be used to launch the executable to the arguments list. \*/  
**$argument**) /\* Pass one argument here.e.g. "-v" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| argument | Pass one argument here. | "-v" |

### Result

Returns OK or error.

### Description

Adds the argument that should be used to launch the executable to the arguments list.  
Be aware that shell expansion does not happen and shell variables are not expanded.  
### Examples

Set three arguments

 MBS ( "RunTask.AddArgument"; "-v" )  
MBS ( "RunTask.AddArgument"; "-s" )  
MBS ( "RunTask.AddArgument"; "test.txt" )  
### See also

- [RunTask.GetArgument](RunTaskGetArgument.md)
- [RunTask.SetArguments](RunTaskSetArguments.md)

### Example Databases

- [Shell/RunTask/Run Shell Script on Mac](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Shell/RunTask/Run%20Shell%20Script%20on%20Mac.shtml#1ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 13th June 2020

  
[RichText.WriteRTF](RichTextWriteRTF.md) - [RunTask.GetArgument](RunTaskGetArgument.md)

[HTML Version](RunTaskAddArgument.shtml)