Archive: Reboot command not executed

Reboot command not executed
Hi! I need some help. I created my custom page for checking of prerequisites. This page also allows installation of the needed software by pressing of the corresponding button. The leave-function has code that checks for reboot-request and executes command Reboot. This works fine when I try to exit from the page with the button "Next". But in some cases I want to force reboot in the show-function, so I simply call the leave-function. In this case the Reboot command is not executed. It is even more strange for me that when I click a button (for example "Back") from my custom page, the PC reboots. Why this is so? It looks that the reboot is made when the leave-function is called "naturally" (I just push the button "Next"), but when I call it with the command Call, the reboot is not made. I'm sure that there is a good explanation about this behavior, but I just can't find it. Please, help...

I solved my problem, but I still can not understand this behavior. Instead to call directly the leave-function from the show-function, I send a message to click the button Next, so the leave-function is called "naturally". This works perfect.