MSIX Win32 app reading raw \\.\C: (MFT) only when run as admin Is it Store-compliant?

Mustapha Ben 35 Reputation points
2026-07-11T13:36:38.3133333+00:00

I'm building a disk-space visualizer (Link removed by Moderator) that I want to ship as a fully Microsoft Store–compliant MSIX (packaged full-trust Win32 app, EntryPoint="Windows.FullTrustApplication"), and I'm looking for the right way to do one thing.

The app works fully in both modes — elevation only changes the scan method, not what the app can do:

  • Standard user (default): scans by walking directories with the normal Win32 APIs (FindFirstFileExW). Everything works.
  • With admin: it instead reads the NTFS Master File Table directly by opening the raw volume, for a much faster whole-drive scan:

Same results either way. the MFT path is purely a speed optimization (the technique WizTree/TreeSize use), and opening the raw volume needs an administrator elevation.

My constraints

  • It must stay a pure, Store-compliant MSIX — not a classic Win32 installer / sideload.
  • It must not require elevation to run: no requireAdministrator, no forced UAC at launch. The app is fully usable by a standard user (it just uses the slower directory walk). A user-initiated UAC prompt to run the fast scan on demand is perfectly fine I only need to elevate that one operation, not the whole app.

What I'm asking

Is there a Store-compliant way for a pure MSIX to do this. ideally elevating just the fast scan on demand (e.g. one UAC prompt via a small elevated helper), without the whole app requiring admin? What approach would you recommend, and has anyone shipped something similar? Open to any pattern that keeps it a fully compliant Store MSIX.

Environment

  • MSIX, full-trust (Windows.FullTrustApplication); capabilities: runFullTrust (+ internetClient for an unrelated feature).
  • Access: CreateFileW("\\\\.\\C:", GENERIC_READ, …), read-only.
  • Behavior: MFT path used only when elevated; otherwise the standard directory walk.
Windows development | Windows App SDK
0 comments No comments

Answer accepted by question author
Taki Ly (WICLOUD CORPORATION) 4,440 Reputation points Microsoft External Staff Moderator
2026-07-13T03:58:51.6466667+00:00

Hello @Mustapha Ben ,

I saw your question and wanted to suggest an architectural pattern that might help you achieve this. You could consider the Out-of-Process Pattern with IPC, which keeps your main app at standard privileges and only elevates a secondary background process when requested by the user.

Consider following these steps to implement this approach:

1. Enable Elevation in Package Manifest

You'll need to declare the allowElevation restricted capability in your app's manifest. This unlocks the ability to use the runas verb inside the MSIX container, without forcing a UAC prompt when the primary app initially opens.

Documentation reference: App capability declarations - restricted capabilities

2. Launch the Secondary Process on Demand

Extract your MFT scanning logic into a separate console application or background task. When the user initiates a fast scan, launch this secondary application using your language's standard Process invoking API (like ProcessStartInfo in .NET) while explicitly specifying the runas verb. This triggers the UAC prompt only for that specific background process. You can then catch any cancellation exceptions to calmly fall back to your normal standard scan.

3. Send Data Back via IPC (Named Pipes)

Since the background process runs elevated and the main app runs standard, they can communicate via Named Pipes. The crucial part in this step is that the elevated process must explicitly set a Security Descriptor (using PipeSecurity and adding an Access Rule for the WorldSid) to allow standard users to read from the pipe. If you skip the Access Control List configuration, your main app will likely get an Access Denied error.

When submitting to the Store, I suggest adding a note in your certification instructions explaining why the allowElevation capability is needed (for example, to run an optional on-demand process for faster low-level disk scanning).

I hope this points you in the right direction! If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide for your confirmation.

Thank you.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.