Thanks for reaching out.
Windows Store apps cannot install or manage Windows Services. This is a limitation of the Store app model for security and reliability reasons—services run with elevated privileges and persist outside the app container, which is not allowed.
Why it’s not supported
- Store apps follow the UWP app model, which enforces sandboxing and prevents installing system-level components like services.
- Windows Services require admin rights and run independently of the app, which violates Store compliance.
Recommended alternatives
- App Services or Background Tasks Move the service logic into an App Service or background task within your packaged app. These run inside the app container and are supported by the Store.
- Desktop Bridge with Full Trust Process You can include a Full Trust Process in your Windows Application Packaging Project to run Win32 code alongside your app. However, even this does not allow registering a Windows Service.
- External Installer (Not Store-Compliant) If the service is mandatory, you’d need a separate installer outside the Store (e.g., MSI). This breaks Store compliance and is not recommended.
Uninstall behavior
There is no supported way for a Store app to uninstall a Windows Service during app removal because uninstall is handled by the Store and does not allow custom scripts.
Best practice: Refactor the service logic into a background task or App Service within the app package. This keeps your app Store-compliant and avoids uninstall issues.
Let me know if the issue persists after following these steps. I’ll be happy to assist further if needed. If the issue has been resolved, please click "Accept Answer".