RunTask.SetLaunchPath
---------------------

Sets the path to be launched.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [RunTask](component_RunTask.md) | [3.1](newinversion31.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.SetLaunchPath"; Path ) 

**MBS**( **"RunTask.SetLaunchPath";** /\* Sets the path to be launched. \*/  
**$Path**) /\* The new path for current working directory.e.g. "notepad.exe" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | The new path for current working directory. | "notepad.exe" |

### Result

Returns OK or error.

### Description

Sets the path to be launched.  
### Examples

Launch a Java application on Mac:

 MBS ( "[RunTask.NewTask](RunTaskNewTask.md)" )  
\# you launch java   
MBS ( "RunTask.SetLaunchPath"; "/usr/bin/java" )  
\# and pass jar file as arguments followed by other arguments   
MBS ( "[RunTask.SetArguments](RunTaskSetArguments.md)"; "-jar" ; "/Applications/test/java.jar"; "Hello" )  
MBS ( "[RunTask.Launch](RunTaskLaunch.md)")  
### See also

- [RunTask.GetLaunchPath](RunTaskGetLaunchPath.md)
- [RunTask.Launch](RunTaskLaunch.md)
- [RunTask.NewTask](RunTaskNewTask.md)
- [RunTask.ReadErrorText](RunTaskReadErrorText.md)
- [RunTask.SetArguments](RunTaskSetArguments.md)
- [RunTask.Wait](RunTaskWait.md)
- [URLScheme.SetDefaultHandler](URLSchemeSetDefaultHandler.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_)
- [Shell/RunTask/RunTask Windows](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Shell/RunTask/RunTask%20Windows.shtml#1ScriptAnchor_)
- [Shell/RunTask/RunTask with read and write on Mac](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Shell/RunTask/RunTask%20with%20read%20and%20write%20on%20Mac.shtml#1ScriptAnchor_)
- [Shell/RunTask/RunTask](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Shell/RunTask/RunTask.shtml#1ScriptAnchor_)

### Blog Entries

- [Tip of the day: Query connected clients on FileMaker Server by script](https://www.mbsplugins.de/archive/2016-08-17/Tip_of_the_day_Query_connected/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

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

  
[RunTask.SetCurrentDirectoryPath](RunTaskSetCurrentDirectoryPath.md) - [RunTask.SetVerb](RunTaskSetVerb.md)

[HTML Version](RunTaskSetLaunchPath.shtml)