Skip to content

Instantly share code, notes, and snippets.

@wdormann
Created December 31, 2017 22:48
Show Gist options
  • Save wdormann/fefc6c4247dfffea65e44dd7e49626cc to your computer and use it in GitHub Desktop.
Save wdormann/fefc6c4247dfffea65e44dd7e49626cc to your computer and use it in GitHub Desktop.
Prevent automatic installation of foistware on Windows 10 versions using AppLocker
<AppLockerPolicy Version="1">
<RuleCollection Type="Appx" EnforcementMode="Enabled">
<FilePublisherRule Id="a1baec9b-3250-44fe-865d-41c9397dcfcd" Name="Microsoft.Windows.ContentDeliveryManager, from Microsoft Corporation" Description="Block foistware?" UserOrGroupSid="S-1-1-0" Action="Deny">
<Conditions>
<FilePublisherCondition PublisherName="CN=Microsoft Windows, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" ProductName="Microsoft.Windows.ContentDeliveryManager" BinaryName="*">
<BinaryVersionRange LowSection="*" HighSection="*" />
</FilePublisherCondition>
</Conditions>
</FilePublisherRule>
</RuleCollection>
<RuleCollection Type="Dll" EnforcementMode="NotConfigured" />
<RuleCollection Type="Exe" EnforcementMode="NotConfigured" />
<RuleCollection Type="Msi" EnforcementMode="NotConfigured" />
<RuleCollection Type="Script" EnforcementMode="NotConfigured" />
</AppLockerPolicy>
@wdormann
Copy link
Author

Note that this won't work on Win10 builds with Applocker support, so it's pretty worthless. See https://gist.github.com/wdormann/49f1807431b0d5b5cd151337e6478f20 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment