Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
680 views
in Technique[技术] by (71.8m points)

background process - Can a (Delphi) desktop-bridge app be restarted via the windows.updateTasks Extension?

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...