# StifleRulez.xml configuration guide

### Configuring the StifleR Rules XML site <a href="#configure-the-stifler-rules-xml" id="configure-the-stifler-rules-xml"></a>

The StifleR client will check through its queue of active downloads (both BITS and DO) and will prioritize them according to a locally held XML configuration file referred to as the StifleR Rules XML file. The Stifler Rules XML contains a list of content download jobs types and priorities which can be centrally managed by an administrator from any web server. When deploying the StifleR Client, one of the installation options is to include the URL hosting the rules file. Clients will download the rules definition XML at a configurable interval. To use the StifleR Rules XML file, a website must be created and the StifleRulez.xml file should be copied to the root directory of the website.&#x20;

The latest version of the StifleRulez.xml file can always be found here:\
<https://github.com/2pintsoftware/StifleRRules/blob/master/StifleRulez.xml>

{% hint style="info" %}
For detailed information regarding the StifleRulez.xml file, see the following page:\
[StifleRulez.xml Configuration Guide](/stifler/configuration/stiflerulez.xml-2.x-definitions.md)
{% endhint %}

#### IIS installation requirement

The minimum IIS role and features required can be installed by using the following PowerShell command:

```
Install-WindowsFeature -Name Web-Server, Web-Windows-Auth -IncludeManagementTools
```

#### **File location**

Place the StifleRulez.xml in the following folder on the StifleR server:

```
C:\ProgramData\2Pint Software\StifleR\Rules
```

#### **Create a virtual folder in IIS**

From an elevated PowerShell prompt, execute the following command:

```
New-WebVirtualDirectory -Site "Default Web Site" -Name StiflerRules -PhysicalPath "C:\ProgramData\2Pint Software\StifleR\Rules"
```

The above command will create a website which you will reference during the StifleR client installation.

​Ex: <http://yourserverfqdn/StiflerRules/stiflerulez.xml>

{% hint style="info" %}
*Note: If you do not configure your own internal rules definition URL, the clients will use a default version of the XML which is included within each client build.*
{% endhint %}

## Introduction

The StifleR client prioritizes BITS and Windows 10 Delivery Optimization (DO) downloads by checking through its queue of active jobs and matching them against a locally held XML configuration file. This file contains a set of administrator-configured rules that define various download types and the priority that should be assigned to each.

It is also possible to assign ‘Auxiliary Bandwidth’ to a certain type (or types) of content which is in addition to the Target Bandwidth that is assigned to a subnet/location.

This allows you to configure the download priority, i.e. which type of download goes first, second, third, etc. in the download queue, according to download type, as well as how much bandwidth is assigned to each of these specific download types. This provides the Administrator with highly granular control over all content transfers.

The actual XML file is named StifleRulez.xml and is installed to:

**%PROGRAMDATA%\2Pint Software\StifleR\Client**

The default version of the StifleRulez.xml file can be found on GitHub:\
<https://github.com/2pintsoftware/StifleRRules/blob/master/StifleRulez.xml>

## Process for prioritizing downloads

A rule is matched to the download job that you want to control using different matching verbs. Once a download has been matched, it is then linked to a StifleR 'Download Type'. The processing order is:

1. The BITS/DO job name is matched and assigned a Job type.
2. The Job type is then associated with a Download Type, against which the BITS/DO priority is set.

The StifleR client first needs to determine the ‘Type’ of download according to the rules within the XML. It starts at the top of the first section and works through the rules until it either has a match for the download type, or there are no matching criteria, in which case the download will be classed as ‘Unknown’.

Once a download type is found, (even if that type is ‘Unknown’), the client looks at the second section of the XML to match that type of download to the settings specified for that transfer.

The first section of the file contains some version information. This can be useful for maintaining your own custom rules definitions, or for checking that you have the latest 2Pint Software version.

```
<StifleRData xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <VersionInfo>
    <Issuer>2Pint Software</Issuer>
    <Version>2.2.0.0</Version>
    <Date>07-06-2019</Date>
  </VersionInfo>
```

Rules specified in the \<Type> child XML elements are processed in the top-down order they appear within the \<TypeData> parent XML element. Rule processing stops at the first match that evaluates to true according to the matching rules. The TypeID attribute for the \<Type> element is then matched in the\<Download> child XML elements within the \<DownloadTypes> parent XML element and the download priority set according to the numerical value assigned in the StifleRPriority attribute.

A sample basic StifleRulez.xml rule file is shown below.&#x20;

```
<StifleRData xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<VersionInfo>
<Issuer>2Pint Software</Issuer>
<Version>1.7.6.0</Version>
<Date>06-06-2018</Date>
</VersionInfo>
<TypeData>
<Type TypeID="001" Match="Equals">Download StifleRulez File</Type> <!-- StifleR Rules Update-->
<Type TypeID="002" Match="URLContains">Express</Type> <!-- MS Express Update-->
<!-- Generic Windows Downloads Section-->
<Type TypeID="100" Match="Contains">Push Notification Platform Job</Type>
<Type TypeID="101" Match="Equals">WU Client Download</Type> <!-- Windows Update-->
<Type TypeID="102" Match="Equals">Windows Store</Type> <!-- Windows Store - W10 DO Only-->
<Type TypeID="103" Match="Equals">UpdateBinary</Type><!-- MS OneDrive-->
<Type TypeID="104" Match="Equals">SpeechModelDownloadJob</Type>
<Type TypeID="105" Match="Equals">SkypeUpdate</Type>
<Type TypeID="106" Match="Equals">Setup Installer</Type>
<Type TypeID="107" Match="Equals">Font Download</Type>
<Type TypeID="108" Match="Contains">DMRCBitsJob</Type>
<Type TypeID="109" Match="Contains">Microsoft Outlook Offline Address Book</Type>
<Type TypeID="110" Match="Equals">Silverlight Updater</Type>
<Type TypeID="111" Match="URLContains">MicrosoftMaps</Type> <!-- MS Maps Update-->
<Type TypeID="112" Match="Equals">PreSignInSettingsConfigJSON</Type>
<Type TypeID="113" Match="Equals">Windows DLP Manager</Type>
<!-- MS ConfigMgr Section-->
<Type TypeID="200" Match="Contains">CCMSETUP DOWNLOAD</Type> <!--CM Auto upgrade client job-->
<Type TypeID="201" Match="URLContains">SCCM_BranchCache$</Type> <!--All types of CM PeerCache transfers-->
<Type TypeID="202" Match="URLContains">SCRIPTGUID</Type> <!-- CM Run SCript-->
<Type TypeID="203" Match="URLContains">sms_dcm</Type> <!-- CM Configuration Baseline Traffic-->
<Type TypeID="204" Match="URLContains">sms_pol</Type> <!-- ConfigMgr Policy Traffic-->
<Type TypeID="205" Match="Contains">CCM Message Upload</Type> <!-- ConfigMgr Inventory Upload-->
<Type TypeID="207" Match="Equals" WellConnected="0" CCMDTSType="4" WinPE="1">CCMDTS Job</Type> <!--Task Sequence in WinPE :
Required deployment-->
<Type TypeID="227" Match="Equals" WellConnected="1" CCMDTSType="4" WinPE="1">CCMDTS Job</Type> <!--Task Sequence in WinPE :
Required deployment-->
<Type TypeID="208" Match="Equals" UserInitiated="1" DownloadOnDemand="1" CCMDTSType="4">CCMDTS Job</Type> <!--Task Sequence in
Full OS : User Initiated : Download on Demand-->
<Type TypeID="209" Match="Equals" DownloadOnDemand="1" CCMDTSType="4">CCMDTS Job</Type> <!--Task Sequence in Full OS :
Required Deployment : Download on Demand -->
<Type TypeID="210" Match="Equals" UserInitiated="1" DownloadOnDemand="0" CCMDTSType="4">CCMDTS Job</Type> <!--Task Sequence in
Full OS : User Initiated : Download All B4 Execute -->
<Type TypeID="211" Match="Equals" DownloadOnDemand="0" CCMDTSType="4">CCMDTS Job</Type> <!--Task Sequence in Full OS :
Required Deployment : Download All B4 Execute -->
<Type TypeID="212" Match="Equals" UserInitiated="1" CCMDTSType="8">CCMDTS Job</Type> <!--Application/Virtual in Full OS : User
Initiated -->
<Type TypeID="213" Match="Equals" CCMDTSType="8">CCMDTS Job</Type> <!--Application/Virtual in Full OS : Required Deployment -->
<Type TypeID="214" Match="Equals" UserInitiated="1" CCMDTSType="0">CCMDTS Job</Type> <!--Pkg/Program in Full OS : User Initiated -->
<Type TypeID="215" Match="Equals" CCMDTSType="0">CCMDTS Job</Type> <!--Pkg/Program in Full OS : Required Deployment -->
<Type TypeID="216" Match="Equals" UserInitiated="1" CCMDTSType="5">CCMDTS Job</Type> <!-- Software Update in Full OS : User Initiated -
->
<Type TypeID="217" Match="Equals" CCMDTSType="5">CCMDTS Job</Type> <!-- Software Update in Full OS : Required Deployment -->
<!-- All others Misc Section includes Internet based downloads and catch-all rules-->
<Type TypeID="300" Match="Contains">.crx</Type>
<Type TypeID="301" Match="Contains">chrome_installer.exe</Type>
<Type TypeID="302" Match="Contains">ArmReaderJobsID</Type>
<Type TypeID="303" Match="URLContains" Internet="1">adobe.com</Type>
<Type TypeID="304" Match="Contains">DropBoxClient</Type>
<Type TypeID="305" Match="Contains">GoogleEarth</Type>
<!-- This should always be the last section - catch-all rules for anything that isn't detected above-->
<Type TypeID="900" Match="SmallerThan" Internet="0">32768</Type>
<Type TypeID="901" Match="LargerThan" Internet="0">1073741824</Type>
<Type TypeID="902" Match="SmallerThan" Internet="1">32768</Type>
<Type TypeID="903" Match="LargerThan" Internet="1">1073741824</Type>
<Type TypeID="904" BranchCache="1" Internet="1" />
<Type TypeID="905" BranchCache="1" Internet="0" />8
<Type TypeID="906" BranchCache="0" Internet="1" />
<Type TypeID="907" BranchCache="0" Internet="0" />
</TypeData><!-- ***** END OF TYPEDATA SECTION *****-->
<DownloadTypes>
<Download TypeID="001" StifleRPriority="100" Name="StifleR Rules Updater"/>
<Download TypeID="002" StifleRPriority="100" Name="CM Express Update"/>
<Download TypeID="100" StifleRPriority="3000" Name="Windows Platform"/>
<Download TypeID="101" StifleRPriority="1000" Name="Windows Update"/>
<Download TypeID="102" StifleRPriority="1000" Name="Windows Store"/>
<Download TypeID="103" StifleRPriority="3000" Name="Microsoft OneDrive Update"/>
<Download TypeID="104" StifleRPriority="3000" Name="Microsoft Speech Update"/>
<Download TypeID="105" StifleRPriority="3000" Name="Skype Updater"/>
<Download TypeID="106" StifleRPriority="3000" Name="Windows Setup Installer"/>
<Download TypeID="107" StifleRPriority="3000" Name="Font Download" />
<Download TypeID="108" StifleRPriority="3000" Name="Windows Device Management"/>
<Download TypeID="109" StifleRPriority="100" Name="Microsoft Outlook OAB Sync" Bandwidth="512" />
<Download TypeID="110" StifleRPriority="3000" Name="Silverlight Updater"/>
<Download TypeID="111" StifleRPriority="3000" Name="Microsoft Maps Update"/>
<Download TypeID="112" StifleRPriority="3000" Name="OneDrive Settings"/>
<Download TypeID="113" StifleRPriority="3000" Name="WIP Manager Update"/>
<Download TypeID="200" StifleRPriority="1000" Name="CM Client Upgrade"/>
<Download TypeID="201" StifleRPriority="100" Name="CM Peer Cache P2P" />
<Download TypeID="202" StifleRPriority="100" Name="CM Run Script" />
<Download TypeID="203" StifleRPriority="100" Name="CM Configuration Baseline"/>
<Download TypeID="204" StifleRPriority="100" Name="CM Policy Download"/>
<Download TypeID="205" StifleRPriority="3000" Name="CM Inventory Upload"/>
<Download TypeID="206" StifleRPriority="1000" Name="CM WinPE User TS" Bandwidth="512" />
<Download TypeID="256" StifleRPriority="100" Name="CM WinPE User TS Well Connected"/>
<Download TypeID="207" StifleRPriority="1000" Name="CM WinPE Required TS"/>
<Download TypeID="227" StifleRPriority="100" Name="CM WinPE Required TS WC"/>
<Download TypeID="208" StifleRPriority="1000" Name="CM Available TS" Bandwidth="512" />
<Download TypeID="209" StifleRPriority="1000" Name="CM Required TS"/>
<Download TypeID="210" StifleRPriority="1000" Name="CM Available TS" Bandwidth="512" />
<Download TypeID="211" StifleRPriority="1000" Name="CM Required TS"/>
<Download TypeID="212" StifleRPriority="1000" Name="CM Available Application" />
<Download TypeID="213" StifleRPriority="2000" Name="CM Required Application" />
<Download TypeID="214" StifleRPriority="1000" Name="CM Available Package" />
<Download TypeID="215" StifleRPriority="2000" Name="CM Required Package" />
<Download TypeID="216" StifleRPriority="1000" Name="CM Available Update" />
<Download TypeID="217" StifleRPriority="1000" Name="CM Required Update" />
<Download TypeID="300" StifleRPriority="3000" Name="Google Chrome Updater" Bandwidth="512" />
<Download TypeID="301" StifleRPriority="3000" Name="Google Chrome Updater" Bandwidth="512" />
<Download TypeID="302" StifleRPriority="3000" Name="Adobe Updater" Bandwidth="512" />
<Download TypeID="303" StifleRPriority="3000" Name="Adobe Updater" Bandwidth="512" />
<Download TypeID="305" StifleRPriority="3000" Name="Google Earth Installer" Bandwidth="512" />
<Download TypeID="900" StifleRPriority="2000" Name="Small Internal Prio 2" Bandwidth="64" />
<Download TypeID="901" StifleRPriority="3000" Name="Large Internal Prio 3" Bandwidth="64" />
<Download TypeID="902" StifleRPriority="2000" Name="Small Internet Prio 2" Bandwidth="128" />
<Download TypeID="903" StifleRPriority="3000" Name="Large Internet Prio 3" Bandwidth="256" />
<Download TypeID="904" StifleRPriority="2000" Name="BranchCache External" Bandwidth="64" />
<Download TypeID="905" StifleRPriority="2000" Name="BranchCache Internal" Bandwidth="64" />
<Download TypeID="906" StifleRPriority="3000" Name="Non-BranchCache External" Bandwidth="128" />
<Download TypeID="907" StifleRPriority="3000" Name="Non-BranchCache Internal" Bandwidth="256" />
</DownloadTypes>
</StifleRData>
```

> Figure 16 A sample default StifleRulez.xml rule file

Example: A job with the display name of “SkypeUpdate” will be linked to the \<Download> XML element's TypeID attribute with a value of 105, and to the StifleRPriority attribute's value of 3000, which sets the BITS job to “3” or low priority.

You can have as many rules as you want, matching as many download types as you need, but keep in mind that the first matching hit will be used. To test and track this, ensure that debug logging is enabled on the clients during your testing.

#### StifleR BITS priority values

The following BITS priority values are applied in the \<Download> XML element according to the values assigned to the StifleRPriority attribute shown above:

```
        ForeGround = 0
        High = 1,
        Normal = 2,
        Low = 3
```

These priority values also appear in the dashboards.&#x20;

#### Auto BITS job classification

Issues can arise where, for instance, some BITS jobs are created using only a GUID ID as the name, making it hard for an administrator to classify the job. StifleR solves this by looking at the URL of the files in the job. It can also apply rules according to the BITS job name, descriptions, URL or other BITS job information.  With Windows 10 the PID (Process ID) creating the job is also tracked, providing additional capabilities to classify the download.

#### StifleR Rules match parameters

In the StifleR Rules file, syntax can be used to match the DisplayName of the job, a string within the URL for the file, and the jobs progress data. No rule is case sensitive.

<div align="left"><img src="/files/-LhFSRJHG2Ds3ZuluiTd" alt="Figure 17 StifleR BITS control Rules Match table"></div>

#### Automatically updating StifleR prioritization rules

The server can instruct clients to download a new version of the StifleRulez file. This can also be done on a scheduled timer, creating a BITS job to download the source of the rules from either the Internet or a corporate URL.

The client tries to update the file on a simple schedule controlled by the UpdateRulesTimerInSec key value in the StifleR.ClientApp.exe.config file. By default, this is set to a value of 604800 which is once a week. Set this to 0 to disable this feature.

If the rule file is missing or if the timer has triggered, the client will try to get a new file from the URL defined in the clients’ configuration file under the StifleRulezURL key string. Merge your own edits with the one downloaded from 2Pint Software and host this file internally on your corporate LAN.&#x20;

{% hint style="info" %}
NOTE: This file does not support the Content-Length as it is hosted on a CDN. To allow StifleR to use HTTP download instead of BITS set the client configuration key UseBITSForRulezDownload to 0 in order to use regular HTTP instead of BITS. Set it to 1 to use BITS for downloading new definition files. BITS requires Content-Length which some NAS/Apache servers don’t do by default. The default file size is \~10 KB.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.2pintsoftware.com/stifler/configuration/stiflerulez.xml-2.x-definitions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
