0

I am attempting to install a UWP package for all users on a machine using ProvisionPackageForAllUsersAsync but I am getting mixed results. Sometimes, the application installs just fine. Other times, some users get the update, and some do not.

Here is what my code looks like:

var packageManager = new PackageManager();

var stage = packageManager.StagePackageAsync(new Uri(appxPath), null);

while (stage.Status == Windows.Foundation.AsyncStatus.Started)
{
    Thread.Sleep(100);
}

//check for error

var provision = packageManager.ProvisionPackageForAllUsersAsync(familyName);

while (provision.Status == Windows.Foundation.AsyncStatus.Started)
{
    Thread.Sleep(100);
}

//check for error

The documentation states that in order to provision a package, the following requirements must be met.

  1. You must be an administrator
  2. The app package to be provisioned must be staged
  3. The app package to be provisioned must be on the system volume. (C:\System Volume Information)

I am confident that I am meeting the first two requirements, as I am an administrator, and I am staging the package in code with no apparent errors.

However, I dont think I am meeting the third requirement. What exactly does it mean by must be on the system volume? Is there a way to programatically add an app package to the system volume? Do I just need to copy the appx file there? Windows does not seem to want to allow any kind of access to the C:\System Volume Information folder.

What am I doing wrong, that is causing me to see this inconsistant partial success when trying to provision my application?

James Hogle
  • 3,010
  • 3
  • 22
  • 46
  • Was this issue could be fixed if the package is copied to the system volume? – Xie Steven Mar 07 '19 at 07:48
  • It seems that windows denies access to that folder, even if the program is run as an administrator. So simply copying the appx to that folder seems like it would be unreliable in production. That makes me thing there is some more official way of getting the app in the system volume. – James Hogle Mar 07 '19 at 15:27
  • You might need to check this: https://support.microsoft.com/en-sg/help/309531/how-to-gain-access-to-the-system-volume-information-folder – Bite Mar 08 '19 at 06:03

1 Answers1

0

I do not know but I think that the "system volume" means the disk or drive where the Windows is installed. Typically it is C:\ but do not take it for granted. Windows could be installed on any drive hence it is not saying specifically to copy the package to the C:\ drive:

The app package to be provisioned must be staged, and it must be on the system volume.

The hidden System Volume Information is mean for other things like System Restore, content indexing service among other things and not for keeping app packages.

J Pollack
  • 2,788
  • 3
  • 29
  • 43