none
[UWP] /hybrid shutdown for fast startup in Assigned access app? RRS feed

  • Question

  • I have a Winrt app running in assigned access (kiosk mode) under windows 10. In order to shut down this app I have used a service that is running in the background wich I call in order to execute the following command:

                    var psi = ProcessStartInfo("shutdown", "/s /hybrid /f /t 0");
                    psi.CreateNoWindow = true;
                    psi.UseShellExecute = false;
                    System.Diagnostics.Process.Start(psi);

    Since the process class is not implemented in winrt I need to go through the service unfortunately.

    I use the /hybrid command in order to get a fast startup the next time I restart my computer. But for some reason this does not work. If I disable assigned access and simply write the same command in my command prompt I will get a fast startup a the next restart but for some reason running it from the service does not give me a fast startup. Of course fast startup is enabled in my windows. I am suspecting that it might have to do with the fact that the service executes the command as a system user and not the current user but I dont know.

    Does anyone know why I don´t get a fast startup when I run the command for hybrid shutdown from my service? Also is there any way to get a fast startup after a shutdown from inside a winrt assigned access app?


    • Moved by Breeze Liu Wednesday, September 6, 2017 7:54 AM off topic
    • Edited by ABerglund Monday, September 18, 2017 8:05 AM
    Thursday, August 31, 2017 2:02 PM

All replies

  • Hi ABerglund,

    Please utilize tagging when posting to this forum, thanks! In this forum, we concentrate on developing Universal Windows apps issue. 

    What is your service? It seems your issue is not in our scope for developing Universal windows apps.

    Best regards,

    Breeze


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, September 1, 2017 6:14 AM
  • Hi Breeze

    I am sorry for missing the tag in my previous post. I have updated this now. The app I am developing is a UWP app. The issue I am haveing with the shut down functionallity is linked both to the fact that I am developing a UWP app, but maybe even more to the functionality of Windows.

    Since it is a UWP app in assigned access I can not shut down from inside the app. This is the root problem for me, I need to shut down from within the app. So the only sollution I have found to shut down is to add a service in the background (this is then .Net). So in order to shut down I call the service which invokes the command prompt command described above in order to shut down.

    When I do this windows will shut down, but it will not perform a fast boot next time windows is started. If I disable assigned access and open the command line as the current user and write the same command as my service executes windows will make a fast boot. If I run the app with Assigned access disabled and shut down through the service again it does not make a fast boot. So it is not linked to assigned access. It must be a difference between executing this command from a service compared to if I personally execute the command myself. So I suspect that the problem for me is that the service executes the command as a system user and not the current logged in user.

    Maybe the [UWP] tag for this issue is not the best? I don´t know exactly what my question is mostly linked to? Windows system, UWP, .Net? It is spred over many boundries. 

    Best regards 

    ABerglund

    Monday, September 18, 2017 8:21 AM