question

MSH-5687 avatar image
0 Votes"
MSH-5687 asked ·

Add-AppxProvisionedPackage command error

Hello

Please someone can help me ? When I try to execute this command in PowerShell as administrator ,

Add-AppxProvisionedPackage -Online -PackagePath c:\AppxPackage\50ea4d02e68f4217869d054e06374b74.appxbundle -LicensePath c:\AppxPackage\50ea4d02e68f4217869d054e06374b74_License1.xml

then I get this error :

Add-AppxProvisionedPackage : Unspecified error At line:1 char:1

  • Add-AppxProvisionedPackage -Online -PackagePath c:\Appx ...

  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • CategoryInfo : NotSpecified: :)) [Add-AppxProvisionedPackage], COMException

  • FullyQualifiedErrorId : Microsoft.Dism.Commands.AddAppxProvisionedPackageCommand


Note : 2 weeks ago I did run the command without error. Then I uninstalled the application (not by command) but by the uninstall button in Apps. Now when I want to install it again by executing the command I get this error. Can someone help me?

Thank you so much

windows-10-setupwindows-uwp-runtime
· 4
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

This method will install the package for the current user and any new user account created on the machine. So when you uninstall by button and re-install using this command, the error may be caused by other users on this machine not uninstalling the app. In addition, it is not recommended to using powershell to install UWP app, it's better to use app installer.

1 Vote 1 ·

Hi FayWang , thank you so much by your repply


In my pc I have just one user , (with admin permissions of course , the same created in the installation of W10) .


I do not have another active account and I am the only user ,no other user account/ login . What I did notice is that after uninstalling the application using the uninstall button, from the start menu was removed correctly , but the application's folders and files had not been removed, they were still in the Program files/WindowsApps directory , then what I did was delete it manually from this folder.


0 Votes 0 ·

So when you delete the application's folders and files from Program files/WindowsApps directory, can you install it again successfully?

0 Votes 0 ·

Hi again FayWang . After delete manually , the folders and files from ProgramFiles/WindowsApps directory , then I was able to successfully run the installation but through executing the .appxbundle package directly.

But the powershell command doesn't work anymore. And the first time I installed it was with the cdmlet powershell command which I commented without issues . And I really would like very much to know what is the reason that the command already gives that error, when the first time I could install it using the command without errors.

0 Votes 0 ·
Sean-Liming avatar image
1 Vote"
Sean-Liming answered ·

Sounds like an unclean install. Besides removing files and folders, you might want to check an registry key associations with the application.

https://docs.microsoft.com/en-us/windows/application-management/remove-provisioned-apps-during-update


· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello Annabooks

Thank you very much for the link you provide me. it is very interesting information.

I am not entirely sure that the case described in that document is applicable to my case. I would have to do more tests.

The key of the matter would be to know what possible causes can result in the error :

Add-AppxProvisionedPackage : Unspecified error At line:1 char:1

  • Add-AppxProvisionedPackage -Online -PackagePath c:\Appx ...

  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • List item

    • CategoryInfo : NotSpecified: :)) [Add-AppxProvisionedPackage], COMException

    • FullyQualifiedErrorId : Microsoft.Dism.Commands.AddAppxProvisionedPackageCommand


knowing that the first time I did run the same command without error. But that once the application was uninstalled from the uninstall button , in the start menu, then when I try to install again with the powershell cmdlet , gave me that error .






0 Votes 0 ·
GregLindsay-7500 avatar image
0 Votes"
GregLindsay-7500 answered ·

Please also check the following registry keys:

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Appx\AllowDevelopmentWithoutDevLicense = 1
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Appx\AllowAllTrustedApps = 1

These keys are mentioned in this thread:

https://social.technet.microsoft.com/Forums/en-US/d4e7e3f2-6757-420d-988a-509bb1e723d1/issue-provisioning-a-windows-app-notspecified-com-exception?forum=win10itprosetup

· 2 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello GregLindsay

thank you so much by your answer

yes .. I had already seen this thread and well I added this registry values. just in case .

But when I first run the command, without error I had not added those two entries to the registry. In other words, the command worked without adding those keys to the registry.

But thank you very much for reminding me of that information.
The change that I saw after adding those two keys to the registry is that in the options for developers of Windows 10 , is the other 2 options is grayed out and developer is preselected and grayed out too . with the main message :
;some of these settings are hidden or managed by your organization

0 Votes 0 ·

Hi MSH,

I recommend creating a new account temporarily and log in under this account then try the command again. This will tell you if the issue is related to the current user profile.

Have you looked at the logs mentioned in the other thread?

Windows Logs > Application Applications and Services Logs > Microsoft > Windows > Apps, Appx...

Comment · Share

0 Votes 0 ·