Share via

Error HRESULT E_FAIL has been returned from a call to a COM component

Anonymous
2025-01-30T07:46:57+00:00

Hy, i have the error Error HRESULT E_FAIL has been returned from a call to a COM component when i try to add a rule or modify one in gpedit and secpol. I need to block microsoft store, help me, Windows 10 professional 22h2 all update, i tried to execute DISM.exe /Online /Cleanup-image /Restorehealth and sfc /scannow but the problem is still there.

Thank you

Windows for home | Windows 10 | Performance and system failures

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Ramesh Srinivasan 81,280 Reputation points Independent Advisor
2025-01-30T11:37:25+00:00

This REG file will create a registry-based policy to block the Store app after a reboot. This is a workaround for Secpol.msc or Gpedit.msc.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\safer\CodeIdentifiers]
"TransparentEnabled"=dword:00000001
"DefaultLevel"=dword:00040000
"PolicyScope"=dword:00000000
"AuthenticodeEnabled"=dword:00000000
"ExecutableTypes"=hex(7):45,00,58,00,45,00,00,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\safer\CodeIdentifiers\0\Paths\{EE7F5AAC-8519-3102-6957-0A3B26B0417F}]
"ItemData"="C:\\Program Files\\WindowsApps\\Microsoft.WindowsStore*"
"SaferFlags"=dword:00000000

To fix the Secpol/gpedit error, you may try resetting the policies to default.

Ref: https://www.tenforums.com/tutorials/68549-reset...

If that doesn't fix the error, a repair installation using the Media Creation Tool can help. If necessary, we can run a ProcMon trace to do a detailed analysis.

Standard Disclaimer: There is a link to a non-Microsoft website. The page appears to provide accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as PUPs (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Anonymous
    2025-01-30T11:10:26+00:00

    I tried both method with secpol, and also via gpedit to block the windows component microsoft store and i had always the error, it's clear enough now?

    Was this answer helpful?

    0 comments No comments
  2. Ramesh Srinivasan 81,280 Reputation points Independent Advisor
    2025-01-30T10:37:19+00:00

    I did read your entire post, but the steps you tried weren't mentioned and it wasn't clear if you used SRP or App Control policies. I'd say the original post was a big vague.

    Since I'm not sure if the steps I posted we tried or not, I'm releasing this question so another user can help you.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2025-01-30T08:53:49+00:00

    Hi Sergio, This is Ramesh.

    Please launch secpol.msc and configure the Software Restriction Policies as in the image below. It blocks the Microsoft Store app.

    Add a new "Path rule" for "C:\Program Files\WindowsApps\Microsoft.WindowsStore*"

    Set it to "Disallowed"

    Maybe you didn't read the whole message. I wrote that when I try to add a rule with both secpol.msc and gpedit.msc I get the error. Also the method you suggested doesn't always work, these days I managed over 40 computers and the only fast and safe system that worked with windows 10 and 11 I got it with gpsedit
    computer configuration:administrative template: windows component:store and set

    only display the private store

    Was this answer helpful?

    0 comments No comments
  4. Ramesh Srinivasan 81,280 Reputation points Independent Advisor
    2025-01-30T08:31:10+00:00

    Hi Sergio, This is Ramesh.

    Please launch secpol.msc and configure the Software Restriction Policies as in the image below. It blocks the Microsoft Store app.

    Add a new "Path rule" for "C:\Program Files\WindowsApps\Microsoft.WindowsStore*"

    Set it to "Disallowed"

    Was this answer helpful?

    0 comments No comments