microsoft / microsoft/msix-packaging

[Feature Request] Make it possible to specify the recovery options for a packaged service

Open
#574 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-MSIX Feature
Dominant language
C
Stars
1.1k
Forks
193
Avg merge
2h 16m
Merged PRs (30d)
2

Description

I didn't find any possibility of setting the recovery options for a service added to an MSIX package. The service is added to the package manifest as a desktop6:Service element as described here. But after the package is installed, all recovery options for the service are set to Take no action:
image
And there is no possibility to change them neither manually:
image
nor via the sc failure cmd command (Result: Error: OpenService FAILED 5: Access is denied. is returned), nor from OpenService function call (it returns NULL and the GetLastError returns ACCES_DENIED=5 code), even if cmd and code are launched with the elevated privileges. It stops me from using this approach because I would like to rely on the service, so I want to set a restart recovery action. But with the Take no action recovery action, once the service process crashes, it will never be restarted by OS.
Is it possible to add this tuning?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the MSIX manifest's desktop6:Service element and the Windows OpenService and sc failure behavior described in the issue. Determine where the MSIX SDK handles packaged service configuration and how recovery actions could be represented; done means a packaged service can specify a restart recovery action instead of defaulting to Take no action.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.