I have successfully packaged a Delphi app in an MSIX container, but I've run into a problem with one of my app's requirements: Upon updating the app from the Store, its background process (a console exe
) is shut down (of course) and replaced with a new copy that is designated in AppxManifest.xml
to run when the main app is first opened:
<Extensions>
<desktop:Extension Category="windows.startupTask" Executable="CwHelper.exe" EntryPoint="Windows.FullTrustApplication">
<desktop:StartupTask TaskId="CwHelper" Enabled="true" DisplayName="Capture Manager" />
</desktop:Extension>
</Extensions>
This all works fine, but it means that the background exe
is left not running until the main app is opened subsequent to the update. This is highly undesirable.
My Internet spelunking of the MSFT docs leads me to think that I should be able to automatically restart the background app by inserting into the above <Extensions>...</Extensions>
block a second Extension
something like this:
<Extension Category="windows.updateTask" Executable="<some>.exe" EntryPoint="<some entrypoint>" >
</Extension>
So far, I have not been able to discover what should be my (Delphi-created) <some>.exe
and its EntryPoint
. Indeed, I have not found any example of this specific use of that Extension Category
. Can it actually be used in this way by a desktop-bridge app? If so, can anyone give me pointers as to what I should put into those blanks?
Note added: I've tried repeating the exe
's name and Windows.FullTrustApplication
in the updateTask
definition fields and that actually passed Certification, but it generates a fatal downloading error when the Store tries to install it.
Another note added: @StefanWick kindly pointed out that he has published an example of the very thing I need here using MSFT's toolset. Unfortunately, it is not clear to me how to translate his C# and Visual Studio labels into a Delphi app. Any advice on that would be greatly appreciated.
question from:
https://stackoverflow.com/questions/65894758/can-a-delphi-desktop-bridge-app-be-restarted-via-the-windows-updatetasks-exten 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…