问题
I Have an Application and currently getting installed on client machine using .msi (wix Project). now I want to auto Update my application which is out of scope of wix .I am considering MSIX for this task . I Can now auto update my application .
But I am not able to find a way out how to Auto start my application .
In .msi application used to be installed on C: Program Files\ . But now using MSIX its in C:\Program Files\WindowsApps<Some Random ID generated by MSIX>. In .msi it was only a registry entry that made the application Auto start like (Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run) but now due to this random id I am not able to do that . Any Idea how to make application Auto start ? TIA :)
回答1:
MSIX packaged apps come with a new deployment and configuration paradigm. The most important part to remember is that the operating system guarantees the integrity of the app installed by the MSIX package, this means indirectly that any third-party access to the install folder of the app is forbidden. This means the old ways of executing an EXE do not apply.
The correct way to launch an at startup an EXE from an MSIX package is to define a StartupTask. in your package AppXManifest. The linked article shows multiple methods of doing this, unfortunately the WiX support for MSIX is in a private branch so we don't have any details on this, but you should be able to use the info as a starting point.
Also, here is a similar article from MSFT on how you can start your MSIX-packaged application in different ways.
来源:https://stackoverflow.com/questions/62780861/how-to-auto-start-an-application-which-is-packaged-using-msix