Closed lucky3004 closed 4 years ago
I added ForceShutdown command.
I tried but i think you forgot to reference the force shutdown in your code/gui. Or am i just to silly using it?
You are right, I forgot to modify UI. It should be good now.
Ok thanks. I tried it but still no force shutdown ;-) I took your project and changed it to force shutdown by default. normally it should work. I try it with an open notepad and unsaved file. If you like to test it.
It should force shut down after 10 seconds, not right away.
I know. I saw it in your code but i wait longer and it is not shutting down. If i wait longer than 30 sec the lockscreen will appear.
I double-checked on my PC, it shuts down PC in 10 seconds. What version of Windows do you have? I have Windows 10 x64.
Can you try to run the command manually from command prompt:
shutdown /s /f /t 10
Do you have something opened that is not saved, when you try to shutdown? I use Win 10 Pro x64 1909 with current CU. Following: I tried your v1.0.26 and if i select "Force Shutdown" it is not working. But if i use a your code and add to the normal shutdown the /f parameter it works. Only in force shutdown it is not working ;-)
I opened notepad and typed something in it, didn't save it. Then in the app settings changed command to "Force Shutdown". Then I clicked on the "Force Shutdown" option in the app menu. The system shuted down in about 10 seconds.
Can you try to run "shutdown /s /f /t 10" command in the command prompt on its own?
I'll try to run v1.0.26 executable. In my test, I ran my local compile version. v1.0.26 is built on build server.
I tried and the command itself is working. I send the command not with the button in your gui. I do it with the provided url. And if i do it with the button it is the same behavior like i showed you in the screenshot. Don't get me wrong, i appreciate completely what you are doing for me. I am trying to get bugs out of your tool ;-) Would you like to see a video?
Let me summarize:
"shutdown /s /f /t 10" command by itself is working.
However, if you use URL or menu option "Force Shutdown" in the notification area then force shutdown does not go through.
You are using v1.0.26 executable.
The video would be helpful to reproduce the problem. I'll test v1.0.26 build using URL.
OMG, i am so sorry. You are completely right. As i was recording the video and trying to show you the url i was calling. I saw that i always called url/shutdown - so i called always the normal shutdown function not the force one. If i just use the default or url/forceshutdown, than it is working like expected. Really, really sorry for that. Thx a lot for your help and your patience. You are awesome
Great! You are welcome.
Is it possible to have a checkbox to force the shutdown/reboot, because if there are some open programs in the background the pc will not shutdown/reboot.