Migrating desktop programs to MS Store (10) – running in Windows S MODE

First briefly introduce Windows 10 S Mode. In this mode, Windows can only run the software in MS Store and cannot be installed by other methods. The advantage is that safety is guaranteed and all domestic rogue software is eliminated. Just like iOS, APPs need to be reviewed when entering the store. At the same time, the APP runs in a sandbox environment with ordinary user rights. It cannot do bad things sneakily, and the situation of grabbing resources will not happen. Naturally, the experience is smooth and the system performance is improved. Everything is so beautiful, but Windows S Mode is not used by anyone…

This tragedy is really hard to say. It may be user habits, or it may be against human nature, and at the same time infringe on the manufacturer (to be reviewed, to be divided into ) And the interests of users (many software and games cannot be installed, let alone D version software). Considering that the MS Store itself is not very rich in APP, I don’t want to use S Mode…

But if you think about it, a certain software originally had a mobile phone and XBOX too. Can run UWP APP (the more you talk, the more angry you are). It’s a bit miserable now, but I don’t know what weird devices will pop up on October 2nd. ARM’s can only be UWP, or low-power devices can only be MS Store. Folding devices, Windows Core OS, etc., so to ensure that an APP can run in Windows 10 S Mode, maybe there is still so much meaning (forcibly washing the floor)……

Because of the theme of this series It is to migrate desktop programs to MS Store, and pure UWP can run in S Mode, so what we will discuss in this article is to use APPX With Desktop Extension to run existing desktop programs in S Mode.

Next, let’s talk about how to test in S Mode, because not as long as it is packaged into APPX through a desktop bridge, it can run successfully in S Mode.

In addition to getting a Windows 10 S Mode machine for testing, according to official documents, we can also simulate S Mode through configuration in Window 10 Pro.

https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-test-windows-s

The audit is described in the document Mode (Audit mode policy), production mode (Production mode policy) and self-signed production mode (Product mode policy with self-signed apps). The latter two really set your Windows 10 Pro to S Mode, so let’s look at the audit mode first, download the audit mode policy file SiPolicy_Audit.p7b through the link on the document, rename it to SIPolicy, and paste it to C:\ Windows\System32\CodeIntegrity\, restart the system.

After completion, you can test the APP that will run in S Mode, and then go to the Event Viewer to check if there is an error message.

Share a picture

You can see it in the picture below, The system believes that Firefox.exe does not meet the requirements of S Mode, but because it is in audit mode, it is allowed to load.

share picture

Next, I am going to muffle and die, copy SiPolicy_Enforced.p7b to the application production mode. After updating the file name and restarting, I tried to click DotNetConsoleApp.exe contained in “Migrate Desktop Program to MS Store (9)-APPX With Desktop Extension”, but the system refused to execute it.

share picture

If we download AppxWithDesktopExSample1 containing DotNetConsoleApp.exe from the store, it can run smoothly.

share picture

In the figure below, you can see that the title of the Console window indicates the absolute path of DotNetConsoleApp.exe.

share picture

In this article, we briefly introduced Windows 10 S Mode and discussed how to test APP running status in S Mode. In the future, we will try to ask for administrator rights in S Mode.

GitHub address:

https://github.com/manupstairs/AppxWithDesktopExtension

MS Store:

https://www .microsoft.com/store/productid/9N22D8RLKZN2

Leave a Comment

Your email address will not be published.