UWP app Shutdown PC don't work in kiosk mode

41 Views Asked by At

I have an UWP application that needs to be used in kiosk mode (One app) on Windows 10 Pro (not IOT). This application should also be able to shut down the PC (both software and hardware).

I followed the instructions on Stefan’s blog: https://stefanwick.com/2018/04/06/uwp-with-desktop-extension-part-1/.

I’ve created :

  • an extension that can shut down the PC (a console project) with one line
  • and a package that bundles this extension with the UWP application.

Everything works fine when I use the application outside of kiosk mode (Windows shuts down properly in both cases).

However, in kiosk mode, when I shut down via the software, the application reboot.

STEP:

1/ In my UWP app, I called

if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.FullTrustAppContract", 1, 0))
{
  await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
}

2/ this code launch my Extension (with the only line):

Process.Start("shutdown","-s -t 00")

I found few links with UWP app and Windows 10 (Pro not IOT) And Stefan's blog is the best I found (the others solutions don't work).

Have you the solution to shutdown a PC in kiosk Mode using a software Button ?

Thx

0

There are 0 best solutions below