microsoft / microsoft/msix-packaging

[Question] PrepareDevirtualizedRegistry returning back 0x80070522 error during installation

Open
#509 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Project
MSIX SDK

Describe the bug
This is more of a question.

During installation, in msix sdk we have PrepareDevirtualizedRegistry handler which will load the Registry.dat to the HKEY_USERS hive.
I saw that the code is loading Registry.dat using the RegLoadKey which needs SE_RESTORE_NAME and SE_BACKUP_NAME privileges to successfully load it. However there will be machines that does not have these privileges (configured by their it admins), then we will receive this 0x80070522 error. (A required privilege is not held by the client.)

How do we handle with these? Will there be an update in the SDK to handle it differently?

https://github.com/microsoft/msix-packaging/blob/master/MsixCore/msixmgr/RegistryDevirtualizer.cpp#L465

To Reproduce
Not sure as not all machines are having this problem

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Platform

Additional context
Add any other context about the problem here.

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 at MsixCore/msixmgr/RegistryDevirtualizer.cpp around line 465 and inspect the RegLoadKey path and its required privileges. Reproduce on a machine lacking SE_RESTORE_NAME or SE_BACKUP_NAME if possible; done would require an agreed SDK behavior for this failure and validation of the resulting installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.