Reboot after Showmessagebox == IDOK

Reboot after Showmessagebox == IDOK

Hi,

 

I am trying the following script:

showmessagebox "Instaltie completed. System will reboot" NO_TIMER 5
if %ShowMessageBoxReturn% = IDOK goto Reboot
:Reboot
reset /s

Unfortunately the reboot starts right away and does NOT wait for me to press the OK button. Any idea how to fix this?

 

I am using SOTI 15.2 and these are scripts for Android Enterprise devices.

 

6 Answers

Order By:   Standard | Newest | Votes
DDMOD@SOTI | posted this 11 August 2020

Hi Yannick,

 

Thanks for the interesting post!

Can you please replace the NO_TIMER to required seconds. In the below example, the device will reboot in 30 seconds.

showmessagebox "Instaltie completed. System will reboot" 30 5
if %ShowMessageBoxReturn% = IDOK goto Reboot
:Reboot
reset /s

Regards,

Technical Support | SOTI Inc. |+1-888-494-SOTI (7684) | support@soti.net | www.soti.net |

  • 1
  • 1
Matt Dermody | posted this 12 August 2020

I don't believe the If/then SOTI scripting is supported by Android devices.

 

 

  • 0
  • 0
Yannick Weijenberg | posted this 12 August 2020

I am afraid you are right Matt. None of the options is working. 

  • 0
  • 0
DDMOD@SOTI | posted this 12 August 2020

Hi Yannick,

 

The "if" keyword works in the below scenario.

I tried the below script on one of my test devices with the latest android agent installed and it worked to reboot the device. Please try again and share the outcome.

showmessagebox "Reboot Device?" NO_TIMER 5 OK

if %ShowMessageBoxReturn% = IDOK goto Test

:Test

log -i "Success"

reset /s

 

Regards,

Technical Support | SOTI Inc. |+1-888-494-SOTI (7684) | support@soti.net | www.soti.net |

  • 0
  • 0
Yannick Weijenberg | posted this 12 August 2020

Hi,

 

The device does reboot, that isn't the issue. Your script did the same as mine. It does NOT wait on the user to press 'OK' to start the reboot. Instead, the message pops up and then just reboots. 

 

I also tried to set the timer to 50 sec, didn't matter.

 

Im using Android Enterprise Agent 14.3.1.1050

  • 0
  • 0
DDMOD@SOTI | posted this 12 August 2020

Hi Yannick,

 

I had tried it on a Android Plus device device and the script worked as expected. I will try again on Android Enterprise and provide you an update soon.

 

Regards,

Technical Support | SOTI Inc. |+1-888-494-SOTI (7684) | support@soti.net | www.soti.net |

  • 0
  • 0

Give us your feedback
Give us your feedback
Feedback