In tip 5845, we added the QuietDisplayName and deleted the DisplayName Value Name to hide an item from Control Panel's Add/Remove Programs applet.

If the application was installed with Windows Installer technology, the WindowsInstaller Value Name, a REG_DWORD data type, is set to a 1. If WindowsInstaller contains a 1, you can hide the item by adding a SystemComponent Value Name, a REG_DWORD data type, and setting it to 1.

I have changed HideFromAddRemove.bat to incorporate the additional method. The syntax for using HideFromAddRemove.bat is:

HideFromAddRemove \\ComputerName "ApplicationDisplayName"

where:

\\ComputerName is the local or remote computer on which you wish to hide an item.
"ApplicationDisplayName"       is a quoted string that identifies the item to be hidden. Only the DisplayName is searched. If you used "Microsoft", all applications that contain Microsoft in the DisplayName will be hidden. The search is NOT case sensitive. DO NOT use the the following characters in your search string: < > & ! ( ) # |

NOTE: HideFromAddRemove.bat uses REG.EXE on Windows 2000, from the Windows 2000 Support Tools, or REG.EXE built into Windows XP, Windows Server 2003, and later.

HideFromAddRemove.bat contains:

                              @echo off                              if \{%2\}==\{\} @echo Syntax: HideFromAddRemove \\ComputerName "Application Display Name"&goto :EOF                              setlocal ENABLEDELAYEDEXPANSION                              set computer=%1                              set computer=%computer:"=%                              set OK=N                              set WI=N                              set computer=%computer:\=%                              set search=%2                              set search=%search:"=%                              set qry1=REG QUERY \\%computername%\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall                              set fnd1="\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"                              for /f "Tokens=*" %%a in ('%qry1%^|find /i %fnd1%') Do (                               set appkey=\\%computername%\%%a                               call :WIset>nul 2>&1                               for /f "Tokens=*" %%i in ('REG QUERY "!appkey!"^|find /i "%search%"') do set wrk1=%%i&call :p2                              )                              if "%OK%" EQU "N" @echo NOT FOUND: %computername% %search%                               endlocal                              goto :EOF                              :p1                              set wrka=%wrk1:=%                              set wrka=%wrka:"=%                              set wrka=%wrka:&=%                              set wrka=%wrka:!=%                              set wrka=%wrka:)=%                              set wrka=%wrka:(=%                              set wrka=%wrka:#=%                              goto :EOF                              :p2                              call :p1                              set wrk3=%wrka:QuietDisplayName=%                              if "%wrka%" NEQ "%wrk3%" set OK=X&goto p2x                              set wrk3=%wrka:DisplayName=%                              if "%wrka%" NEQ "%wrk3%" set OK=Y                              :p2x                              if "%OK%" EQU "N" goto :EOF                              if "!WI!" EQU "Y" goto p3                              if "%OK%" EQU "X" goto :EOF                              @echo REG ADD "!appkey!" /v QuietDisplayName /t REG_SZ /f /d "%search%"                              REG ADD "!appkey!" /v QuietDisplayName /t REG_SZ /f /d "%search%"                              REG DELETE "!appkey!" /V DisplayName /F >nul 2