How can I do some additional cleanup when user uninstalls my MSIX app? #3061
Replies: 6 comments 8 replies
-
This is a current limitation. MSIX currently doesn't have a declarative option to define Windows Task Scheduler jobs (there's no MSIX supports Background Tasks which are equivalent(ish) to Windows Task Scheduler jobs. Does that meet your needs? |
Beta Was this translation helpful? Give feedback.
-
I want to run my app as admin at startup (silently, no UAC prompt). MSIX's Startup Task doesn't provide this feature. The snipping tool Snipaste does this by creating a schedule task. However since MSIX doesn't allow developers to hook uninstalling process, after uninstalling Snipaste, the schedule task is still in Task Scheduler. |
Beta Was this translation helpful? Give feedback.
-
If you define a windows.startupTask and the target app/exe has a Fusion (SxS) manifest declaring it runs elevated that's insufficient as you'd get a UAC prompt? Likewise if you define You're using a Task Scheduler job as a "StartupTask but launch as admin"? If the windows.startupTask extension had an option Is "run as admin" a package-constant for you? If your appxmanifest.xml declared a windows.startupTask as If MSIX supported Trying to feel out the shape of your ask. |
Beta Was this translation helpful? Give feedback.
-
Following this as I'm also interested in doing something like this (I have a Windows Service which I would like to cleanup), I took a brief look at |
Beta Was this translation helpful? Give feedback.
-
Is that a Packaged Service? i.e. installed via MSIX. Those are automagically cleaned up when the package is removed just like other MSIX installed artifacts.
Yes, that extension's restricted to packages in MSIXVC format. That's typically used by AAA games and poses several caveats and complexities making it ill suited to other ends. PackagedServices are the recommended answer to provide a service via MSIX with all the usual benefits (including integrated automagic cleanup on uninstall). |
Beta Was this translation helpful? Give feedback.
-
What kinds of folders where? ApplicationData's created for your package family. Is there a problem using that? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
For example, my MSIX WinUI 3 app added some schedule tasks to Windows Task Scheduler. I want to delete these schedule tasks when user uninstalls my app. Is there any way to achieve this?
Relative discussion: https://techcommunity.microsoft.com/t5/msix/msix-custom-uninstall-processing/m-p/916781
Beta Was this translation helpful? Give feedback.
All reactions