Windows-Auto-Night-Mode
Windows-Auto-Night-Mode copied to clipboard
Use MSIX installer format
Would be nice if this used the MSIX installer package to make it easy to right click uninstall native in Windows 10 as opposed to old school Windows 7 style.
I think this isn't possible, because MSIX only provides appx files, or?
Should work with any windows app: https://docs.microsoft.com/en-us/windows/msix/overview
- Sammy Guergachi
From: Armin Osaj [email protected] Sent: Monday, December 21, 2020 4:55:14 PM To: Armin2208/Windows-Auto-Night-Mode [email protected] Cc: Sammy Guergachi [email protected]; Author [email protected] Subject: Re: [Armin2208/Windows-Auto-Night-Mode] Use MSIX installer format (#195)
I think this isn't possible, because MSIX only provides appx files, or?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Armin2208/Windows-Auto-Night-Mode/issues/195#issuecomment-749217973, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAEWHWS6H7XJUBFZG7ENN23SV674FANCNFSM4VEP6T6A.
At the very least, similarly to what has been demonstrated at http://github.com/yereverluvinunclebert/Rocketdock-Enhanced-Settings-VB6/issues/1, http://docs.microsoft.com/windows/msix/msix-core/msixcore shall be easy enough to transition to that it should be completed soon.
Unless Microsoft removes the restriction that msix apps can only run sandboxed (why uninevitably breaks Auto Dark Mode), packaging with msix will not happen.
We will keep this issue open as it would be neat to have, but there's little chance this will actually happen soon.
A friend of mine did the analysis based on source code and solved any difficulties you might have when packaging MSIX 我的一位朋友基于源代码进行了分析,并解决了您在打包MSIX时所遇到的困难
Those were his exact words 这是他的原话
I tried to package the application and found that it adjusted Windows day/night mode correctly.After that, I found that the MSIX container does not virtualize the location of the registry HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize.Finally, I tried to write a small CLI program and package it into MSIX to verify the guess.After running, Windows can switch day/night mode normally 我尝试打包这个应用程序,我发现它可以正确地对Windows的日间\夜间模式进行调整。在那之后,我发现MSIX容器不会对注册表HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize的这一位置进行虚拟化。最后,我尝试编写一个小的CLI程序并将其打包到MSIX中,以便验证猜测。运行后,Windows能够正常地切换日间\夜间模式
Maybe this is a bug of MSIX Container (Windows 11 Build 22000.318), but MS has allowed app to use flexible virtualization feature. 也许这是MSIX容器(Windows 11 Build 22000.318)的一个bug,但微软允许应用程序使用灵活的虚拟化特性。
We can add this node to AppxManifest to exclude certain keys from the registry. 我们可以在AppxManifest中添加该节点以排除注册表的某些键。
<virtualization:RegistryWriteVirtualization>
<virtualization:ExcludedKeys>
<virtualization:ExcludedKey>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize</virtualization:ExcludedKey>
</virtualization:ExcludedKeys>
</virtualization:RegistryWriteVirtualization>
Microsoft docs:https://docs.microsoft.com/en-us/windows/msix/desktop/flexible-virtualization
Hmm it doesn't look like this is a bug but rather a feature that has been introduced to Win11, and Win10 starting with the 21H1 update.
In theory, it will indeed be possible to package ADM with .msix, but there's a few more steps required to make this happen. These include, but are not limited to:
- Proper build tools that allow automatic creation of said .msix package
- Potential changes in the update mechanism when deploying msix packages.
I tried once again, it's not possible. MSIX is too restrictive for anything that has to interact with the system in any way.