Before we upgraded our Windows 2008 R2 print server to a virtual 2012 Server we thought it would be useful to find out what default printer our users had selected. We have multiple floors, locations and departments that use the print servers at our main site via T1’s and some fiber. As I wrote in a previous article, since the SCCM client queries as “System” it doesn’t query the HKEY_CURRENT_USER (HKCU) of the current user, it queries the HKCU of “System” and that’s not where the information were looking for is located.
The first thing we needed to find out was what registry key under HKCU contains the default printer. Since all of our PC’s are Windows 7, that part was easy. The registry key for the default printer in Windows 7 is:
With the default printer value under “device”.
Now that we know which registry key to query >> Go to \Assets and Compliance\Overview\Compliance Settings\Configuration Items. Right Click on Configuration Items and select Create Configuration Item.
This starts the “Create Configuration Item Wizard” screen. Give the item a name and a description if needed. In this case I wrote “Find Users that have the HP-4050 network printer set as the default.” The description is a little misleading, what were really doing is seeing if a registry key that contains the value for the default printer is the same as the one we will specify in the compliance settings. In the end the “Compliant” devices will have the HP-4050 set as the default printer and the “Non-Compliant” devices will not. Since we are gathering this printer information purely for “Informational” reasons there will be no remediation required. Keep the default “Windows” and leave “This configuration item contains application settings” blank. If desired you can create and assign a “Category” to the item. Click Next.
I unchecked the “Select all” since our users are all Windows 7 (32-bit) and Windows 8. You also have the option to “Specify the version of Windows manually“. Click Next.
Select “New” and Click “Next”
This brings up the “Create Settings” dialog box.
Give the settings a name and description if needed. The “setting type” is a “Registry Value” and the “Data Type” is a “String”. Click the down arrow on the “Hive Name” and Select “HKEY_CURRENT_USER” from the drop-down.
Now select “Browse”
Now the “Browse Registry” Dialog Box Appears.
Then browse to HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows and you will find the “Device” key with the default printer information. Select that Device Key. Make sure that “Select the rule that defines compliance for the selected registry value:” is checked, and Click on “The selected registry value must exist on client devices” Below that Check “This registry value must satisfy the following rule if present.” Click the Down Arrow and select “Begins with” and enter the value HP-4050. Click OK.
Click OK Again
Now you can see the rules that we just saved. Click Next.
The next screen is the Summary Screen, Click Next..
This shows the Wizard has completed successfully.
Now that you have created your Configuration Item we need to Create a Configuration Baseline and Deploy it to a Collection.