0

I've been trying to figure out the following question on the net, but cound't find an answer.

I'm doing custom application installations using Powershell (nothing new here).

Now, I have the following requirement: I would like to add a Comment and a Contact in the Add / Remove Programs, that indicates by which process the application has been installed.

Any ideas?

avi.elkharrat
  • 6,100
  • 6
  • 41
  • 47
  • 1
    just edit them into the reg key under `HKLM...Uninstall`, that's where add/remove pulls from. you'll need to edit `Contact`, `DisplayName` and `Comments` I believe. – colsw Oct 02 '17 at 15:57
  • Thx. Would you like to reply me a full answer so i can tag it as a good reply? – avi.elkharrat Oct 03 '17 at 11:26

2 Answers2

1

The Add/Remove programs list uses the keys under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall for all of its information.

if you set the following keys under your program it will change the values in Add/Remove programs.

DisplayName for the 'main' title name.

Contact for the help address.

Comments for any further comments you want in the list.

colsw
  • 3,216
  • 1
  • 14
  • 28
0

I eventually stumbled on a PS command to do this, thx to ConnorLSW's answer:

Set-RegistryKey -key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + $RegKey -Name "$MyKey" -Value "$MyValue" -Type String

where

  • $RegKey is some (king of UUID) string that identifies your installed application
  • $MyKey is the field you need to update (in my case, DisplayName, Contact or Comments)
  • $MyValue is the actual value you want to display in that field

Now it's time for a little caution disclaimer:

My understanding is that this command can be further generalized to update any registration keys on your machine. Please be very cautious when using it.

avi.elkharrat
  • 6,100
  • 6
  • 41
  • 47