[GH-ISSUE #537] Can't add return codes for script checks #341

Closed
opened 2026-03-02 02:15:36 +03:00 by kerem · 3 comments
Owner

Originally created by @guillaumebottollier on GitHub (May 28, 2021).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/537

Server Info (please complete the following information):

  • OS: Debian 10
  • Browser: chrome and firefox
  • RMM Version (as shown in top left of web UI): 0.6.11

Installation Method:

  • [ X] Standard
  • Docker

Agent Info (please complete the following information):

  • Agent version (as shown in the 'Summary' tab of the agent from web UI): 1.5.6
  • Agent OS: [e.g. Win 10 v2004, Server 2012 R2] Windows

Describe the bug
When creating a script check, it's not possible to had return codes informational or warning, pressing enter has no effects

To Reproduce
Steps to reproduce the behavior:
create a script check and try to had codes informational or warning

Expected behavior
code should be added

Screenshots
image

Additional context
Add any other context about the problem here.

Originally created by @guillaumebottollier on GitHub (May 28, 2021). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/537 **Server Info (please complete the following information):** - OS: Debian 10 - Browser: chrome and firefox - RMM Version (as shown in top left of web UI): 0.6.11 **Installation Method:** - [ X] Standard - [ ] Docker **Agent Info (please complete the following information):** - Agent version (as shown in the 'Summary' tab of the agent from web UI): 1.5.6 - Agent OS: [e.g. Win 10 v2004, Server 2012 R2] Windows **Describe the bug** When creating a script check, it's not possible to had return codes informational or warning, pressing enter has no effects **To Reproduce** Steps to reproduce the behavior: create a script check and try to had codes informational or warning **Expected behavior** code should be added **Screenshots** ![image](https://user-images.githubusercontent.com/84961534/119952024-dd16e280-bf9c-11eb-8335-d54ac0000637.png) **Additional context** Add any other context about the problem here.
kerem closed this issue 2026-03-02 02:15:36 +03:00
Author
Owner

@sadnub commented on GitHub (May 28, 2021):

Exit codes need to be a number. Also for powershell, make sure you set the exit code like this:

$host.SetShouldExit($exitcode)
exit

Due to the way scripts are executed the actual exit code won't come through properly with this.

Hope this helps!

<!-- gh-comment-id:850505810 --> @sadnub commented on GitHub (May 28, 2021): Exit codes need to be a number. Also for powershell, make sure you set the exit code like this: ``` $host.SetShouldExit($exitcode) exit ``` Due to the way scripts are executed the actual exit code won't come through properly with this. Hope this helps!
Author
Owner
<!-- gh-comment-id:850507523 --> @wh1te909 commented on GitHub (May 28, 2021): https://shapeshed.com/unix-exit-codes/#what-is-an-exit-code-in-the-unix-or-linux-shell
Author
Owner

@guillaumebottollier commented on GitHub (May 31, 2021):

Great, this works ! many thanks !

<!-- gh-comment-id:851226188 --> @guillaumebottollier commented on GitHub (May 31, 2021): Great, this works ! many thanks !
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#341
No description provided.