Get more value from this HP Printer Driver (by disabling Printer Status Notification popups)

As the senior engineer for a mid-sized VMware Horizon View virtual desktop infrastructure , I sometimes have to figure out how to configure legacy applications to perform better in a modern non-persistent VDI world.

My most resent challenge was to globally disable HP’s annoying Printer Status Notification popup messages that occurred every day for some users.

I think we would all get more value if HP was less annoying.
I think we would all get more value if HP was less annoying.

Physical vs Virtual

For traditional physical PCs, opting-in to a one-time pop-up request for “HP attractive offers” at printer installation is annoying. But for virtual non-persistent desktops that get deleted every day (along with the user’s prior request of “No, do not send this info to HP and do not ask me again”), this daily message could drive a normal user crazy.

Most VDI users do not understand that they get a brand new, freshly-built desktop at the start of each day. Their desktop doesn’t even have printers installed on it yet. All it has is the HP Universal Print Driver preinstalled and a VMware ThinPrint Location-Based Printing configuration that is ready to automatically map printers to the desktop at logon.

To make matters worse, when a VDI user physically moves from thin-client A to thin-client B, their virtual desktop uninstalls the printers that were near location A and begins installing the printers that are now near location B — triggering a new round of annoying HP Printer Driver Privacy Settings popups.

HP Printer Administrator Resource Kit

The HP Printer Administrator Resource Kit (PARK) is HP’s attempt to provide administrators the tools and scripts that help them globally install, deploy, configure, and manage the HP Universal Print Driver. Like most legacy products, PARK is going nowhere in a VDI environment.

While PARK includes an Active Directory Administrative template that can be imported and used by Group Policy to mute HP’s Status Notification Pop-ups (e.g. Group Policy Management > User Configuration > Policies > Administrative Templates > HP Managed Print Policies 4.4.6 > Status Notification Pop-ups > Disabled), this method is unable to keep up with the pace of VDI and the way users roam their desktops to multiple locations (triggering printers to uninstall from old location and reinstall from new location). VDI printers are mapped/unmapped at a pace that does not correlate with when Group Policy is implemented, so users receive yet another notification that HP wants to “add more value.”

Windows Registry

Thankfully, HP uses the Windows Registry to store its configuration settings for each printer (once the printer is installed). The three Registry Keys that will disable/nuke the “Get more value from this HP Printer Driver” popups once and for all are: SSNPCurrentModelSupport, SSNPDriverUISetting, and SSNPNotifyEventSetting.

  • HKLM:\System\CurrentControlSet\Control\Print\Printers\YOUR-PRINTER-NAME\PrinterDriverData\SSNPCurrentModelSupport
  • HKLM:\System\CurrentControlSet\Control\Print\Printers\YOUR-PRINTER-NAME\PrinterDriverData\SSNPDriverUISetting
  • HKLM:\System\CurrentControlSet\Control\Print\Printers\YOUR-PRINTER-NAME\PrinterDriverData\SSNPNotifyEventSetting

For these three registry keys, you want their value to be zero.

  • 1 = annoying HP popups
  • 0 = no HP popups

If you prefer to use a .reg file, it work look something like this:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\YOUR-PRINTER-NAME\PrinterDriverData] "SSNPCurrentModelSupport"=dword:00000000 "SSNPDriverUISetting"=dword:00000000 "SSNPNotifyEventSetting"=dword:00000000

Unfortunately, the registry path to the keys that need to be changed from 1 to 0 include the unique name of each printer. This makes it difficult to use a script, preconfigured .reg files, Group Policy Preferences > Windows Settings > Registry, or some other systematic and scalable solution that makes these changes moments after a printer is installed.

Powershell

This seemed like problem well suited for Powershell, a Microsoft scripting language I worked on learning in 2014. I already knew Get-ChildItem could work with Registry Keys. I also knew the PowerShell “-Recurse” Parameter or its ability to use “*” wildcards were two good options for me to pursue.

Go Wild

I ended up preferring the use of wildcards. After all, the registry path to the keys that I wanted to change were exactly the same with the exception of the unique printer name somewhere in the middle. I also learned about Get-ItemProperty, which seemed better suited for my task in changing the value of a registry key.

Here are the three Powershell commands that I wrote that will quickly crawl the registry to find the three SSNPCurrentModelSupport, SSNPDriverUISetting, and SSNPNotifyEventSetting keys for printers by any name; then change their value to 0.

Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Print\Printers*\PrinterDriverData" -Name SSNPCurrentModelSupport -ErrorAction SilentlyContinue | Set-ItemProperty -Name SSNPCurrentModelSupport -Value 0
Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Print\Printers*\PrinterDriverData" -Name SSNPDriverUISetting -ErrorAction SilentlyContinue | Set-ItemProperty -Name SSNPDriverUISetting -Value 0
Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Print\Printers*\PrinterDriverData" -Name SSNPNotifyEventSetting -ErrorAction SilentlyContinue | Set-ItemProperty -Name SSNPNotifyEventSetting -Value 0

Those three one-liner Powershell commands will disable the HP printer popups. My next problem was figuring out how to run these commands in a VDI environment that is installing and uninstalling printers (and their registry settings) thousands of times a day.

Using Group Policy Preferences to deploy a Scheduled Task to run Powershell to disable HP Printer Popups

I know that’s a long subheading, but here’s how to tie it altogether. We’re going to create a Group Policy Preference that will create a Scheduled Task on each VDI desktop that will run our three Powershell commands that will modify three registry values minutes after uniquely-named printers get installed at logon on reconnect.

Create a Group Policy

Open Group Policy Management, select the Active Directory Organizational Unit that contains the virtual desktops you want to receive this policy, “create a GPO in this domain and link it here,” and then Edit your new “HP Status Notification Popup (Set to Disabled)” policy.

In Group Policy Management Editor, navigate to Computer Configuration > Preferences > Control Panel Settings > Scheduled Tasks > New > Scheduled Task (at least Windows 7).

Create a new Group Policy Preference and Scheduled Tasks
Create a new Group Policy Preference and Scheduled Tasks

Scheduled Task > General

For the General tab, I recommend these settings:

  • Action: Replace
  • Name: HP Status Notification Popup (Set to Disabled)
  • Description: Use Powershell to change a registry value for HP printers that should disable a cosmetic HP Printer popup from appearing. We are using Powershell instead of GP > Preferences > Windows Settings > Registry because we need to target multiple printers that each have unique registry strings. Powershell permits wildcards in registry paths, making it the better tool.
  • User account: NT AUTHORITY\System
  • Run whether user is logged on or not: Enabled
  • Run with highest privileges: Enabled
Running as System grants permission to modify HKLM.
Running as System grants permission to modify HKLM.

Scheduled Task > Triggers

For the Trigger tab (e.g. what causes the scheduled task to run), I configured three.

These settings attempt to run the Powershell commands moments after printers are installed.
These settings attempt to run the Powershell commands moments after printers are installed.
Scheduled Tasks > Trigger 1 > At Log On

VMware ThinPrint typically installs a printer one minute after logon. But if many printers are configured to be installed, it might take a few minutes. These settings ensure the Powershell commands are run shortly after all printers are installed.

  • Delay task for: 1 minute
  • Repeat task every: 5 minutes
  • For a duration of: 15 minutes
Trigger that runs three times after first logon.
Trigger that runs three times after first logon.
Scheduled Tasks > Trigger 2 > On an Event > ID 21

Somewhat redundant of the first trigger, this trigger looks for a specific Event Viewer ID to appear in Applications and Services Logs > Microsoft > Windows > TerminalServices-LocalSessionManager > Operational. Event ID 21 = Remote Desktop Services: Session logon succeeded.

Trigger Powershell to run when noticing Event 21.
Trigger Powershell to run when noticing Event 21.
Scheduled Tasks > Trigger 3 > On an Event > ID 25

This is an important trigger that will run our Powershell commands when printers get reinstalled after a user moves their virtual desktop from thin-client A to thin-client B. Event 25 = Remote Desktop Services: Session reconnection succeeded. This is also a great trigger for updating other items like BgInfo.

A trigger that runs when a user reconnects to their VDI session.
A trigger that runs when a user reconnects to their VDI session.

Scheduled Task > Actions

For the Actions tab (e.g. our Powershell scripts), I configured three.

Here you include one of three Powershell one-liners.
Here you include our three Powershell one-liners.

The three Actions will be very similar. Only the “Add arguments” field should be different, one for each Powershell one-liner script.

  • Action: Start a program
  • Program/Script: Powershell
  • Add Arguments: one of the three Powershell scripts
Action will be to start Powershell and run the one-line script.
Start Powershell and run the one-line script.

For your reference, here again are the three one-line scripts.

Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Print\Printers*\PrinterDriverData" -Name SSNPCurrentModelSupport -ErrorAction SilentlyContinue | Set-ItemProperty -Name SSNPCurrentModelSupport -Value 0
Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Print\Printers*\PrinterDriverData" -Name SSNPDriverUISetting -ErrorAction SilentlyContinue | Set-ItemProperty -Name SSNPDriverUISetting -Value 0
Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Print\Printers*\PrinterDriverData" -Name SSNPNotifyEventSetting -ErrorAction SilentlyContinue | Set-ItemProperty -Name SSNPNotifyEventSetting -Value 0

Scheduled Task > Conditions/Settings/Common

For the last three tabs I stick with the default settings.

Closing

If you made this this far you likely learned the following:

  • that HP printer popup messages are annoying
  • there are three registry settings that need to be changed from 1 to 0 to disable the HP popups
  • there are three Powershell commands that can quickly find and change those registry settings for all installed printers
  • you can use Group Policy Preferences to deploy a Scheduled Task
  • you can use the Scheduled Task to run your Powershell scripts
  • you can trigger the Scheduled Task to run based on logon or specific Event IDs in the Windows Event Log
  • by triggering your Scheduled Tasks to run minutes after printers are installed on virtual desktops (which happens at logon and reconnect), you will hopefully prevent the HP Printer popups from appearing

If you have a simpler method, please feel free to share in the comments. Thank you.

1 Comment


  1. Get-ItemProperty -Path “HKLM:\System\CurrentControlSet\Control\Print\Printers\*\PrinterDriverData” -Name SSNPDriverUISetting -ErrorAction SilentlyContinue | Set-ItemProperty -Name SSNPDriverUISetting -Value 0

    Get-ItemProperty -Path “HKLM:\System\CurrentControlSet\Control\Print\Printers\*\PrinterDriverData” -Name SSNPNotifyEventSetting -ErrorAction SilentlyContinue | Set-ItemProperty -Name SSNPNotifyEventSetting -Value 0

    Get-ItemProperty -Path “HKLM:\System\CurrentControlSet\Control\Print\Printers*\PrinterDriverData” -Name SSNPCurrentModelSupport -ErrorAction SilentlyContinue | Set-ItemProperty -Name SSNPCurrentModelSupport -Value 0

    !! …printers\*\ PrinterDriverData is the syntax !!

Comments are closed.