cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
userzed
Pilgrim

Howto change the Product name displayed in Add/Remove programs?

How do I change the default product name that appears in the Add/Remove programs window, i.e. the displayname value in the uninstall key in windows registry?
Labels (1)
0 Kudos
26 Replies
shankrupa
Pilgrim

Re: Howto change the Product name displayed in Add/Remove programs?

You can update the registry entry for your product
By setting the display name for your product

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\your_productname]

"DisplayName"="Customized Display Name"

Hope this will help you
0 Kudos
MEinstaller
Pilgrim

Re: Howto change the Product name displayed in Add/Remove programs?

What if there is no registry key created for my product. I check the [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\your_productname] and there is nothing listed for the product that I just installed.
Can I still use your suggestion of updating the registry entry if it doesn't exist?

Thanks,
0 Kudos
MEinstaller
Pilgrim

Re: Howto change the Product name displayed in Add/Remove programs?

Nevermind I found the registry entry, it just wasn't named with the name of my application. But when I use the Registry update it does not change the name of my application in the Add/Remove programs. Should I be using something besides the update registry action? Should it be something in the postInstall? Any guidance you could provide would be appreciated.
0 Kudos
enanrum
Pilgrim

Re: Howto change the Product name displayed in Add/Remove programs?

I use the same concept to change the icon for my uninstallers in the ARP console, you can use it for the display name:

My reg file:
[CODE]REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$V(HASHKEY)]
"DisplayName"="$V(CUSTOMDISPLAYNAME)"
[/CODE]
You can set the CUSTOMDISPLAYNAME and HASHKEY values in a Custom Action prior to the Install section in the sequence:

String displayname =  "Your Custom Name";
String installLocation = arg0.resolveString("$P(absoluteInstallLocation)");
installLocation = FileUtils.normalizeFileName(installLocation, '/');
// Product_bean is the Bean ID for the Product
// Installation Design -> Product Name -> Advanced -> Bean Id
String uid = arg0.resolveString("$P(Product_Bean.key.UID)");
int hash = installLocation.hashCode();
String uidandhash = uid + hash;

arg0.getServices().getISDatabase().setVariableValue("CUSTOMDISPLAYNAME",displayname );
arg0.getServices().getISDatabase().setVariableValue("HASHKEY",uidandhash);


Regards,
Tom
0 Kudos
MEinstaller
Pilgrim

Re: Howto change the Product name displayed in Add/Remove programs?

Thanks for the quick reply. I tried what you suggested but I get a NullPointerException: fileName cannot be null error in my log file.
Any idea why this is happening? From looking at the code you gave me it looks like it should work. Would you need to see the log file?

Thanks
0 Kudos
enanrum
Pilgrim

Re: Howto change the Product name displayed in Add/Remove programs?

Can you post the code you used in your Custom Action?

How are you using fileName?
0 Kudos
MEinstaller
Pilgrim

Re: Howto change the Product name displayed in Add/Remove programs?

I used the code you posted but put in my display name. Then I selected onExecuting for the event. Maybe that's where I messed up?
Now in my events I have the following:
package com.installshield.gicu.event;

import java.io.*;
import java.net.*;
import com.installshield.event.*;
import com.installshield.event.ui.*;
import com.installshield.event.wizard.*;
import com.installshield.event.product.*;
import com.installshield.wizard.*;
import com.installshield.wizard.service.*;
import com.installshield.wizard.awt.*;
import com.installshield.wizard.swing.*;
import com.installshield.wizard.console.*;
import com.installshield.product.*;
import com.installshield.util.*;
import com.installshield.ui.controls.*;
import com.installshield.database.designtime.*;

public class InstallScript
{

public void onExecutingbean240f5a9a0fe43cf9bf12f52cc503ce76f(com.installshield.event.wizard.WizardActionContext arg0)
{
}
}
0 Kudos
userzed
Pilgrim

Re: Howto change the Product name displayed in Add/Remove programs?

Many Thanks.

I've been looking for the longest time for a method to determine the product uninstall key. I could see that the first part of the string is the UID; did not know what the second part was until now!
0 Kudos
enanrum
Pilgrim

Re: Howto change the Product name displayed in Add/Remove programs?

Very important to add the Custom Action in your sequences first - then add the on Executing the Custom Action to the events and then put it the code!

Are you still having issues?
0 Kudos