gpedit crashes with error "found an error in a snap-in" SrpUxSnapin.dll issues RRS feed

  • Question

  • We are running Windows 10 Enterprise v.1607. We need to be able to work with applocker.

    Scenario: gpedit.msc >Local Computer Policy>Windows Settings>Security Settings>Application Control Policies>App Locker>Packaged app Rules>Create New Rule>Permissions [I select Deny and a User on my machine]>Condition [Publisher]

    I then select "Use an installed packaged app as a reference"  and press the "Select..." button.  That's where the problem occurs:

    1) The entire "Create Packaged app Rules" window disappears and

    2) a "SrpUxSnapIn.dll" dialog box appears that indicates, "MMC has detected an error in a snap-in and will unload it."  

    3) I'm given two choices, "Report this error to Microsoft, and then shut down MMC."  or "Unload snap-in and continue running".

    4) Either choice, when selected, leads to an error message that MMC has stopped working, and gpedit closes.

    I see a final dialog, "Unhandled Exception in Managed Code Snap-in", which reads:


           Exception has been thrown by the target of an invocation

    Exception Type: System.Reflection.TargetInvocationException

    at Microsoft.ManagementConsole.Internal.SnapInMessagePumpProxy.OnThreadException(Object sender, ThreadExceptionEventArgs e)

      at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)

      at System.Windows.Forms.Control.WndProcException(Exception e)

      at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

      at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

      at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)

      at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

      at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

      at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)

      at Microsoft.Security.Srp.Ux.SrpUxRuleListView.CreateManualRule(RuleType ruleType)

      at Microsoft.ManagementConsole.View.DoAction(Int32 actionId, Boolean selectionDependent, Int32 selectionId, IRequestStatus requestStatus)

      at Microsoft.ManagementConsole.View.ProcessRequest(Request request)

      at Microsoft.ManagementConsole.ViewMessageClient.ProcessRequest(Request request)

      at Microsoft.ManagementConsole.Internal.IMessageClient.ProcessRequest(Request request)

      at Microsoft.ManagementConsole.Executive.RequestStatus.BeginRequest(IMessageClient messageClient, RequestInfo requestInfo)

      at Microsoft.ManagementConsole.Executive.SnapInRequestOperation.ProcessRequest()

      at Microsoft.ManagementConsole.Executive.Operation.OnThreadTransfer(SimpleOperationCallback callback)


    We have done the following without any luck in fixing the issue:

    SFC /scannow ->finds nothing

    Clean boot -> issue persists

    regsvr32 SrpUxSnapIn.dll -> cannot find module

    DISM /Online /Cleanup-Image /ScanHealth -> issue persists

    We believe we have a GPMC bug as it's consistently reproducible. We need to load a new SrpUxSnapin.dll and link it to the correct directories. Question is how we do this? I cannot find the .dll nor any instruction from MS how to reinstall it.

    Please help

    Wednesday, May 17, 2017 1:35 PM

All replies

  • Hi,

    I have done your AppLocker configuration on my 1607 Enterprise machine, the result is ok. After I clicked Select button, the Select applications dialog appeared.

    So I think it is not a bug, your Windows image should have something wrong.

    If sfc /scannow and dism commands no help, you need to execute a repair upgrade, using original 1607 iso to upgrade system then check again.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact

    Thursday, May 18, 2017 2:44 AM
  • Hello,

    Try the in-place upgrade to repair GPO snap-in:

    Let us know if this helps, Good luck :)

    Microsoft MVP (Windows and Devices for IT)

    Windows Insider MVP

    Windows Help & Support []

    Thursday, May 18, 2017 7:56 AM
  • Would you mind letting me know the update of the problem? If you need further assistance, feel free to let me know. I will be more than happy to be of assistance.

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact

    Tuesday, June 6, 2017 2:52 AM
  • Is there anyone who have a solution?

    In-Place Upgrade doesn't fix this issue.
    And there are many other people with the same issue:

    I'm using Windows 1703 Enterprise Build 15063.674.
    With 1607 all works fine!

    • Edited by PatrickGr Thursday, November 2, 2017 2:09 PM
    Thursday, November 2, 2017 2:08 PM