# Shell Parameters vs Arguments and other Shell Questions

**URL:** <https://forum.xojo.com/t/shell-parameters-vs-arguments-and-other-shell-questions/72553>\
**Category:** General\
**Created:** [October 5, 2022, 3:32pm UTC](https://forum.xojo.com/t/shell-parameters-vs-arguments-and-other-shell-questions/72553 "2022-10-05T15:32:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julia\_Truchsess](https://forum.xojo.com/user_avatar/forum.xojo.com/julia_truchsess/32/499_2.png) [@Julia\_Truchsess](https://forum.xojo.com/u/Julia_Truchsess)\
**Post date:** [October 5, 2022, 3:32pm UTC](https://forum.xojo.com/t/shell-parameters-vs-arguments-and-other-shell-questions/72553/1 "2022-10-05T15:32:29Z")

</div>

I’m fairly noob at Shell stuff but have a new project that’s going to require a lot of (Windows) shelling to control external applications.

I’m unclear as to when to use parameters passed with the Execute command as opposed to passing things in the Arguments property. In this topic [XOJO ignoring arguments when running an EXE from shell](https://forum.xojo.com/t/xojo-ignoring-arguments-when-running-an-exe-from-shell/71668), KevinG suggested passing them in Arguments, but the OP found this didn’t work and the solution turned out to be passing them in Execute(path,[parameters]).

Also, I see MBS has a ShellMBS class of their own (of course). Any significant benefits to using this instead of Xojo’s?

---

<div class="post-metadata">

**Author:** ![MarkusR](https://forum.xojo.com/user_avatar/forum.xojo.com/markusr/32/685_2.png) [@MarkusR](https://forum.xojo.com/u/MarkusR)\
**Post date:** [October 5, 2022, 4:35pm UTC](https://forum.xojo.com/t/shell-parameters-vs-arguments-and-other-shell-questions/72553/2 "2022-10-05T16:35:50Z")

</div>

Execute(Command As String, [Parameters As String])  
…

edit (misunderstood question)

---

<div class="post-metadata">

**Author:** ![Julia\_Truchsess](https://forum.xojo.com/user_avatar/forum.xojo.com/julia_truchsess/32/499_2.png) [@Julia\_Truchsess](https://forum.xojo.com/u/Julia_Truchsess)\
**Post date:** [October 5, 2022, 4:44pm UTC](https://forum.xojo.com/t/shell-parameters-vs-arguments-and-other-shell-questions/72553/3 "2022-10-05T16:44:17Z")

</div>

> [@MarkusR](#):
>
> Execute(Command As String, [Parameters As String])

Yes, I understand the Execute method. My question is how does the [parameters] parameter of the Execute method differ from the Arguments _property_ of the Shell class.

[https://documentation.xojo.com/api/os/shell.html#shell-arguments](https://documentation.xojo.com/api/os/shell.html#shell-arguments)

---

<div class="post-metadata">

**Author:** ![MarkusR](https://forum.xojo.com/user_avatar/forum.xojo.com/markusr/32/685_2.png) [@MarkusR](https://forum.xojo.com/u/MarkusR)\
**Post date:** [October 5, 2022, 4:52pm UTC](https://forum.xojo.com/t/shell-parameters-vs-arguments-and-other-shell-questions/72553/4 "2022-10-05T16:52:22Z")

</div>

öhm

because the docu say  
`Arguments As String`  
`Specifies the arguments to pass to the Shell backend. The default is "-c".`  
i think it is something else and have nothing to do with the parameters at execute.

seems this name “Arguments” there is good for wrong interpretation.

---

<div class="post-metadata">

**Author:** ![Julia\_Truchsess](https://forum.xojo.com/user_avatar/forum.xojo.com/julia_truchsess/32/499_2.png) [@Julia\_Truchsess](https://forum.xojo.com/u/Julia_Truchsess)\
**Post date:** [October 5, 2022, 5:01pm UTC](https://forum.xojo.com/t/shell-parameters-vs-arguments-and-other-shell-questions/72553/5 "2022-10-05T17:01:16Z")

</div>

> [@MarkusR](#):
>
> i think it is something else and have nothing to do with the parameters at execute.

Ah, thank you 🙂

---

<div class="post-metadata">

**Author:** ![DerkJ](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DerkJ](https://forum.xojo.com/u/DerkJ)\
**Post date:** [October 5, 2022, 5:28pm UTC](https://forum.xojo.com/t/shell-parameters-vs-arguments-and-other-shell-questions/72553/6 "2022-10-05T17:28:59Z")

</div>

Arguments sends it to the backend for example if the backend is bash then xojo executes something like:

“/bin/bash -c “”/path/to/the/shell arg1 arg2"”"

This happens internally, your command is actually:  
Execute(“/path/to/the/shell”, “arg1 arg2”)  
xojo does the rest.

---

<div class="post-metadata">

**Author:** ![Julia\_Truchsess](https://forum.xojo.com/user_avatar/forum.xojo.com/julia_truchsess/32/499_2.png) [@Julia\_Truchsess](https://forum.xojo.com/u/Julia_Truchsess)\
**Post date:** [October 5, 2022, 5:41pm UTC](https://forum.xojo.com/t/shell-parameters-vs-arguments-and-other-shell-questions/72553/7 "2022-10-05T17:41:41Z")

</div>

> [@DerkJ](#):
>
> for example if the backend is bash then xojo executes something like:
> 
> “/bin/bash -c “”/path/to/the/shell arg1 arg2"”"
> 
> This happens internally, your command is actually:  
> Execute(“/path/to/the/shell”, “arg1 arg2”)

That is a _very_ clear explanation. Xojo should add it to the docs verbatim 🙂

---

<div class="post-metadata">

**Author:** ![DerkJ](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DerkJ](https://forum.xojo.com/u/DerkJ)\
**Post date:** [October 6, 2022, 7:09am UTC](https://forum.xojo.com/t/shell-parameters-vs-arguments-and-other-shell-questions/72553/8 "2022-10-06T07:09:30Z")

</div>

Thanks, xojo would have my permission to do so.
