0

We have a UWP app that runs on Windows Kiosk Assigned Access Mode. We want to turn off the screen during the night when no one is using the device.

We are encountering some difficulties. When we turn off the screen with command. The app is stopped, then the Kiosk mode/Windows will relaunch the app. We don't want that.

We try many solution like using

SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF);

SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED);

But all the solutions we try when the screen is turn off our app is stopped

We want the app to continue running non-stop when the screen turns off. Has anyone had this problem before and found a solution? Thank you for your help

  • It is recommended that you refer to the document [Run in the background indefinitely](https://learn.microsoft.com/en-us/windows/uwp/launch-resume/run-in-the-background-indefinetly), use capability `extendedExecutionUnconstrained`. – Junjie Zhu - MSFT Jul 25 '23 at 03:16
  • We already try to add this inside our manifest and this solution doesn't work. The app is still close when the screen turn-off. There is something we doesn't understand with the AssignedAccess and when we turn off the screen. – Ludovic Roux Jul 25 '23 at 11:56
  • Can the same behavior be reproduced with other apps after turning off the screen in kiosk mode, – Junjie Zhu - MSFT Jul 26 '23 at 08:22
  • Yes of course we made a very simple sample which undergoes the same behavior. I also attached windows defender in kiosk mode and it also shut down and restarted – Ludovic Roux Jul 26 '23 at 14:50
  • This looks like a system behavior, but there is currently no documentation for this, I will check with the team if this is by design and if there is a workaround. – Junjie Zhu - MSFT Jul 27 '23 at 07:33
  • Thanks if you find anything please let me know. – Ludovic Roux Jul 28 '23 at 14:43

0 Answers0