[windows] Add MSIX app support
Closed this issue · 6 comments
Vonarian commented
The issue is when I enable launch at startup for my app which is installed using MSIX, literally nothing happens.
I found a workaround, which is running a batch / ps script to remove / add app shortcut to startup apps:
@echo off
SET currentDirectory=%~dp0
PUSHD %currentDirectory%
CD ..
CD ..
CD ..
CD ..
SET MNIST_DIR=%CD%
SET appExeDir=%MNIST_DIR%
powershell "$s=(New-Object -COM WScript.Shell).CreateShortcut('%userprofile%\Start Menu\Programs\Startup\WTNews.lnk');$s.TargetPath='%appExeDir%\wtnews.exe';$s.Arguments='connect';$s.IconLocation='%userprofile%\Start Menu\Programs\WTNews.lnk';$s.WorkingDirectory='%appExeDir%';$s.WindowStyle=7;$s.Save()"
This works without a flaw, and isEnabled
and isDisabled
booleans can return existence of the shortcut.
tenraneko commented
+1 (Same)
ksm-android commented
+1 (same)
shuax commented
+1
shuax commented
我参考这个文章解决了。 https://www.advancedinstaller.com/msix-disable-registry-file-redirection.html
如果你们也是用msix这个包。
打开appx_manifest.dart
在<Properties>
添加一行<desktop6:RegistryWriteVirtualization>disabled</desktop6:RegistryWriteVirtualization>
然后pubspec.yaml
的msix_config:
加上capabilities: unvirtualizedResources
打包出来的应用应该能穿透注册表隔离。
shuax commented
unvirtualizedResources
慎用,审核好难过😅