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.
- You must be an administrator
- The app package to be provisioned must be staged
- 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?