MediaInfo icon indicating copy to clipboard operation
MediaInfo copied to clipboard

Windows 11 registration sometimes fails

Open JeromeMartinez opened this issue 1 year ago • 14 comments

Up to now I received 2 reports about this issue. The second person provided this:

MD5 hash for 64-bit only .exe: 5850DAEF7B2FD94A04D6A4001AE452FF 32/64 hash: 8644818749031AAE77B66462BFC1CD97. Size is 14,266,408 bytes, "size on disk" is 14,274,560 bytes. All from your website. Windows 11 Pro machine with Intel Core CPU, Windows 11 installed via Rufus bypass. This is the first problem I've had installing any app in a very long time. I have no explanation and v24.11.1 works fine. Screenshot of message when running after install below. media

I think we should at least have a fallback, not leaving the program if the registration fails.

For reference the first person only provided:

In my Windows 11 install v24.12 throws an 'unable to run, perhaps you don't have proper permissions' error message. Tried setting the .exe to run in admin mode, still no go. Reverted to v24.11 and everything is fine again.

Different message but not possible to have more information ("I do not have any interest in being your guinea pig, so I'll not be responding to any of your specific questions." answer to my request for more details after having said that he could be less pretentious in his first message 😅)

JeromeMartinez avatar Dec 11 '24 18:12 JeromeMartinez

1st person I'm not sure if that error is even the exact error produced by Windows. The style does not sound like something Windows would show and searching for it produces no exact match. We cannot help when help is refused.

2nd person MediaInfo should still run if package failed to install. It should be the same as running on Windows 10 as package is not installed on Windows 10. This error appearing actually means the package is already installed. Not sure what Windows means by could not be registered. Searching for this error shows cases where Windows built-in apps fail to launch with the same error so it may be issue with the particular Windows installation and not the app.

To get more info about what is happening with the package, the following PowerShell commands can be used:

  • Check if package is provisioned (this step is done by MediaInfo_PackageHelper)
    Get-AppxProvisionedPackage -Online | Where-Object {$_.DisplayName -match "MediaInfo"}
    
  • Check if package is installed for current user (this step is done automatically by Windows)
    Get-AppxPackage MediaInfo
    

Observation: The screenshot showing error dialog in dark colour with white titlebar and black OK text as well as mention of Rufus bypass hints that this user is the type that tweaks Windows likely beyond what is officially documented/supported by Microsoft which may or may not have anything to do with this issue.

cjee21 avatar Dec 12 '24 06:12 cjee21

Answer from the user:

  1. When I click ok the box just disappears and that's it.

  2. I could be missing it but with v24.12 installed I don't see anything regarding Mediainfo in the right click context menu. Note that I have StartAllBack running that provides the right click context menu in a single click (could possibly make some changes to it).

  3. See results of of PowerShell commands run just below.

media

JeromeMartinez avatar Dec 13 '24 15:12 JeromeMartinez

Both provisioning and install/registration are fine as there is MediaInfo package returned for both commands with Status: Ok on last line.

I have no idea what StartAllBack actually does to Windows but an app with this name has been previously blocked by Microsoft/Windows.

cjee21 avatar Dec 13 '24 16:12 cjee21

If we can not fix it, would it be at least a workaround? Which line of code could produce this error? We could either smoothly ignore the error rather than "disappearing" (I am not sure to understand if the box is disappearing or MediaInfo completely), or having a possibility to not launch the command (but if the Windows Explorer related checkbox is unchecked, which part of the code creates the issue?)

JeromeMartinez avatar Dec 13 '24 17:12 JeromeMartinez

It seems to be produced by Windows while attempting to start MediaInfo.exe. Based on other occurrences of similar error online, it can even happen while opening an image file with Windows built-in Photos app when the Windows installation is messed up.

As a workaround, the user can try to remove the MSIX package. Can be done by using PowerShell but will need to be done every time MediaInfo is updated unless the cause of the issue is rectified.

cjee21 avatar Dec 13 '24 17:12 cjee21

Can be done by using PowerShell

Please remind me the command?

but will need to be done every time MediaInfo is updated unless the cause of the issue is rectified.

We could check if MediaInfo is already installed and the MSIX package not registered and we don't register it if it is the case.

JeromeMartinez avatar Dec 13 '24 17:12 JeromeMartinez

We could check if MediaInfo is already installed and the MSIX package not registered and we don't register it if it is the case.

But it has to be installed for users updating from older versions or re-attempt to install if the previous installation somehow fails.

cjee21 avatar Dec 13 '24 17:12 cjee21

But it has to be installed for users updating from older versions or re-attempt to install if the previous installation somehow fails.

True. Let's first see with removing the MSIX package and we see if other people are impacted before doing something.

JeromeMartinez avatar Dec 13 '24 17:12 JeromeMartinez

Please remind me the command?

Remove-AppxProvisionedPackage to remove the provisioned package Remove-AppxPackage to remove the package that has been installed by Windows for the current user

After running, both previous commands in posts above should return nothing if all successfully removed.

cjee21 avatar Dec 13 '24 17:12 cjee21

we see if other people are impacted before doing something.

If too many people having issues, we should just put the fully packaged VCL or Qt GUI in the Store and only do the new shell extensions there and direct Windows 11 users to the Store version.

cjee21 avatar Dec 13 '24 17:12 cjee21

only do the new shell extensions there and direct Windows 11 users to the Store version.

I hope that we won't do that... We'll see.

JeromeMartinez avatar Dec 13 '24 17:12 JeromeMartinez

Remove-AppxProvisionedPackage to remove the provisioned package Remove-AppxPackage to remove the package that has been installed by Windows for the current user

Sorry to ask for more, but as I don't use to manage that I prefer to be sure, what are the expected exact commands? We user needs to do both?

JeromeMartinez avatar Dec 13 '24 17:12 JeromeMartinez

what are the expected exact commands?

Remove-AppxProvisionedPackage -PackageName "MediaInfo_24.12.0.0_neutral__0z25jj8eabac0" -Online
Remove-AppxPackage -Package "MediaInfo_24.12.0.0_neutral__0z25jj8eabac0"

The package name changes in each version as well as when the publisher name changes so the exact name as shown by the previous commands in https://github.com/MediaArea/MediaInfo/issues/993#issuecomment-2541686449 should be used.

We user needs to do both?

Do both to ensure complete removal. After that repeat the commands in https://github.com/MediaArea/MediaInfo/issues/993#issuecomment-2541686449 which should return nothing.

cjee21 avatar Dec 13 '24 18:12 cjee21

The real solution is likely to reinstall Windows: https://answers.microsoft.com/en-us/windows/forum/all/package-could-not-be-registered-windows-11/a725a62d-124f-4536-bf88-8fef32d3397e

cjee21 avatar Mar 25 '25 18:03 cjee21