[GH-ISSUE #376] checking the return value of the "before script" #2246

Closed
opened 2026-03-01 17:18:59 +03:00 by kerem · 4 comments
Owner

Originally created by @VShawn on GitHub (Mar 14, 2023).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/376

Originally assigned to: @VShawn on GitHub.

    It's easy to return an exit code from ps1/cmd/bat files. Use "Exit 1" in powershell or "exit /b 1" in batch files. 0 means success, everything else means failure.

Having said this, it would make sense to implement checking the return value of the "before script" in PRemoteM at some rainy day in the future. Till then I can live with the current behavior. 😉

Originally posted by @MWinhard in https://github.com/1Remote/1Remote/discussions/363#discussioncomment-5228034

Originally created by @VShawn on GitHub (Mar 14, 2023). Original GitHub issue: https://github.com/1Remote/1Remote/issues/376 Originally assigned to: @VShawn on GitHub. It's easy to return an exit code from ps1/cmd/bat files. Use "Exit 1" in powershell or "exit /b 1" in batch files. 0 means success, everything else means failure. Having said this, it would make sense to implement checking the return value of the "before script" in PRemoteM at some rainy day in the future. Till then I can live with the current behavior. 😉 _Originally posted by @MWinhard in https://github.com/1Remote/1Remote/discussions/363#discussioncomment-5228034_
kerem 2026-03-01 17:18:59 +03:00
Author
Owner

@MWinhard commented on GitHub (Mar 16, 2023):

Just installed version 0.7.2.7 and changed the connect script to fail. The RDP connection is not trying to connect. Instead a MessageBox is shown. Works as expected. 😁

However, in version 0.7.2.7 the script after disconnected is complaining.

2023-03-16 10_01_48-Script after disconnected

That's my script after disconnected:

"C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --command disconnect myconnection.ovpn

It worked flawlessly in version 0.7.2.3. I'm starting a second instance of openvpn-gui.exe just to send a message to the running instance. The second instance returns within a split second.

<!-- gh-comment-id:1471582028 --> @MWinhard commented on GitHub (Mar 16, 2023): Just installed version 0.7.2.7 and changed the connect script to fail. The RDP connection is not trying to connect. Instead a MessageBox is shown. Works as expected. 😁 However, in version 0.7.2.7 the script after disconnected is complaining. ![2023-03-16 10_01_48-Script after disconnected](https://user-images.githubusercontent.com/111646687/225566916-65d61fb9-e534-44bf-a4b3-f6b01cba1391.png) That's my script after disconnected: `"C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --command disconnect myconnection.ovpn` It worked flawlessly in version 0.7.2.3. I'm starting a second instance of openvpn-gui.exe just to send a message to the running instance. The second instance returns within a split second.
Author
Owner

@MWinhard commented on GitHub (Mar 16, 2023):

The script after disconnected complains, too, if I wrap it in a *.cmd file.

<!-- gh-comment-id:1471601170 --> @MWinhard commented on GitHub (Mar 16, 2023): The script after disconnected complains, too, if I wrap it in a *.cmd file.
Author
Owner

@VShawn commented on GitHub (Mar 16, 2023):

oh I make a mistake on one line.

this one would help

https://github.com/1Remote/1Remote/releases/download/0.7.2.7/PRemoteM-0.7.2.7.zip

<!-- gh-comment-id:1471625045 --> @VShawn commented on GitHub (Mar 16, 2023): oh I make a mistake on one line. this one would help https://github.com/1Remote/1Remote/releases/download/0.7.2.7/PRemoteM-0.7.2.7.zip
Author
Owner

@MWinhard commented on GitHub (Mar 16, 2023):

The script after disconnect doesn't complain anymore. 😁
Thank you very much.

-------- Original Message --------
Subject: Re: [1Remote/1Remote] checking the return value of the "before
script" (Issue #376)
From: VShawn @.>
To: 1Remote/1Remote @.
>
Cc: Markus Winhard @.>, Mention @.>
Date: Donnerstag, 16.03.2023 10:47:42

oh I make a mistake on one line.

this one would help

https://github.com/1Remote/1Remote/releases/download/0.7.2.7/PRemoteM-0.7.2.7.zip


Reply to this email directly, view it on GitHub
https://github.com/1Remote/1Remote/issues/376#issuecomment-1471625045,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2TZPXY2D7FJ2UTHV2MMJPDW4LOT5ANCNFSM6AAAAAAVZZSJMM.
You are receiving this because you were mentioned.Message ID:
@.***>

<!-- gh-comment-id:1471669823 --> @MWinhard commented on GitHub (Mar 16, 2023): The script after disconnect doesn't complain anymore. 😁 Thank you very much. -------- Original Message -------- Subject: Re: [1Remote/1Remote] checking the return value of the "before script" (Issue #376) From: VShawn ***@***.***> To: 1Remote/1Remote ***@***.***> Cc: Markus Winhard ***@***.***>, Mention ***@***.***> Date: Donnerstag, 16.03.2023 10:47:42 > > oh I make a mistake on one line. > > this one would help > > https://github.com/1Remote/1Remote/releases/download/0.7.2.7/PRemoteM-0.7.2.7.zip > > — > Reply to this email directly, view it on GitHub > <https://github.com/1Remote/1Remote/issues/376#issuecomment-1471625045>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/A2TZPXY2D7FJ2UTHV2MMJPDW4LOT5ANCNFSM6AAAAAAVZZSJMM>. > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
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/1Remote#2246
No description provided.