Try to execute UWP AppX by Delphi/C++Builder on "Windows 10 S like restricted mode"

Posted by on in Blogs

This is translated article and based on http://qiita.com/kazinoue/items/5358b82cd5b04c2fa6da

この記事は Qiita に投稿した記事をベースにして英語で記述したものです。こちらの記事のほうがスクリーンショットは多めですが、内容に大きな差異はありませんので、日本人の方は Qiita の記事をお読みいただくのがよいでしょう。

Prologue

“Windows 10 S” is new edition of Windows10 and announced at May/2017. It is for education and currently preinstalled on Surface Laptop. And most important point is “Only Windows Store application can run on it.”

But now (16/Jun/2017), it may be difficult to get Windows 10 S installer because it is not available on MSDN. So I tried to configure Windows 10 Pro to Windows 10 S like restricted mode, and to execute UWP application build by Delphi/C++Builder.

 

How to configure Windows 10 S like restricted mode on Windows 10 Pro ?

On microsoft website, we can find the document “Test your Windows app for Windows 10 S” as follow link.

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

Summary of instruction is follows.

  • Get policy files from microsoft website.

  • Choice policy files and copy as C:\Windows\System32\CodeIntegrity\SIPolicy.P7B

  • After reboot windows, this restricted configuration is available.

  • Test your application.

  • After test, delete policy file and reboot windows to exit restricted mode.

And when you test it, it is recommended to run on Virtual Machine environment.

Try to run restricted applications…

Microsoft announces “Executing command prompt, power shell, registry editer, or some other programs are prohibited on Windows 10 S”.

So I’ve try to use policy file “SiPolicy_Enforced.p7b” on my Windows 10 Pro based VMware virtualmachine.

copy Policy file

This policy file restricts as same as Windows 10 S.

For first, I found “vmware tools” cannot run on restrected policy mode. I found error message by notification and on event viewer.

vmware tools cannot execute with restricted mode

And also I’ve tryed to run “cmd.exe”, I cannot execute it and got error message.

try to execute cmd.exe...

Try to run UWP application installed by Windows store, build by Delphi/C++Builder.

After then, also I try to install UWP application from Windows Store as follows.

https://www.microsoft.com/en-us/store/p/my-minifigures/9nblggh42ct8

https://www.microsoft.com/store/apps/9nblggh40lbr

One is by Marco Cantu.

UWP app marco cantu

And another is by Kaz Aiso(Japan SC Team).

UWP app kaz aiso

And also both has built by RAD Studio and run on restricted mode.

But this result doesn’t commit “Any UWP application by Delphi/C++Builder can run on Windows 10 S”. In this case, it works well. But if you wish to deploy your application onto Windows 10 S, you have to test on restricted environment like as this article.

 



About
Gold User, No rank,
Sales Consultant at Embarcadero Technologies, in Japan.

Comments

Check out more tips and tricks in this development video: