This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Howto change the Product name displayed in Add/Remove programs?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 06, 2006
03:56 PM
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?
(26) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 20, 2006
12:17 AM
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
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
08:05 AM
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,
Can I still use your suggestion of updating the registry entry if it doesn't exist?
Thanks,
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
08:14 AM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
09:52 AM
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:
Regards,
Tom
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
10:42 AM
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
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
10:47 AM
Can you post the code you used in your Custom Action?
How are you using fileName?
How are you using fileName?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
10:51 AM
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)
{
}
}
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)
{
}
}
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
11:15 AM
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!
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!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
11:17 AM
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?
Are you still having issues?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
11:38 AM
Thanks.
No issues. I just wrote and tested a custom event to determine the product uninstall key using .
A lesson learned:
Place the 'get uninstall key' custom event in the Sequences view AFTER any logic to determine the install location (e.g the Destination dialog). The install location hash code (obviously) depends on the install location string value.
No issues. I just wrote and tested a custom event to determine the product uninstall key using .
A lesson learned:
Place the 'get uninstall key' custom event in the Sequences view AFTER any logic to determine the install location (e.g the Destination dialog). The install location hash code (obviously) depends on the install location string value.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
11:42 AM
Ahh...yes, the hash is based on the install location - when I said add it prior to the install section - I meant Right before it!!!
Glad it worked out for yah.
later
Tom
Glad it worked out for yah.
later
Tom
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
02:59 PM
When I try to compile it gives me errors saying that
Error in InstallScript.java on line 33: unreported exception com.installshield.wizard.service.ServiceException; must be caught or declared to be thrown
and
Error in InstallScript.java on line 33: unreported exception com.installshield.database.ISDatabaseException; must be caught or declared to be thrown
for this line of code
arg0.getServices().getISDatabase().setVariableValue("HASHKEY",uidandhash);
I didn't know that these threw exceptions, any thoughts on this?
Error in InstallScript.java on line 33: unreported exception com.installshield.wizard.service.ServiceException; must be caught or declared to be thrown
and
Error in InstallScript.java on line 33: unreported exception com.installshield.database.ISDatabaseException; must be caught or declared to be thrown
for this line of code
arg0.getServices().getISDatabase().setVariableValue("HASHKEY",uidandhash);
I didn't know that these threw exceptions, any thoughts on this?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 26, 2006
07:48 AM
Ok I caught the exceptions that were thrown but I'm still having some issues. I can get it to compile depending where I place this action in my sequence. Although it still does not change the name in the Add/Remove programs. If I put the action down in the postInstall then I get an error on install about the registry file missing some double quotes but it looks alright to me. Does it matter where I have the Registry update action in my Install Design?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 27, 2006
10:25 AM
It should compile no matter where you put it in your sequences! You must be carefull NOT to remove the Custom Action from the sequence without removing the Custom event in the Events section using the 'Event Browser' button! If you can't see your action when you click the Event Browser - let me know there is away to get it in there!
Other than that I can't see why you would be having errors!!!
All you are doing with the Custom Action is setting the 2 variables by getting the HASHKEY and DisplayName! Thats why you need to do that after the destination dialog and before the Install in the sequence! You can add your 'Windows Registry Update' to any feature! Are you getting errors in the error log?
This should work!
Other than that I can't see why you would be having errors!!!
All you are doing with the Custom Action is setting the 2 variables by getting the HASHKEY and DisplayName! Thats why you need to do that after the destination dialog and before the Install in the sequence! You can add your 'Windows Registry Update' to any feature! Are you getting errors in the error log?
This should work!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 30, 2006
07:55 AM
Here is the code I used to get this to work on my machine.
public void onExecutingbean(com.installshield.event.wizard.WizardActionContext arg0) throws ServiceException, ISDatabaseException
{ String displayname = "Name I wanted displayed";
ProductService ps = (ProductService)arg0.getService(ProductService.NAME);
ps.setRetainedProductBeanProperty(ps.DEFAULT_PRODUCT_SOURCE, "bean_ID of bean you are changing", "displayName", displayname);
}
Hopefully this will help others.
public void onExecutingbean
{ String displayname = "Name I wanted displayed";
ProductService ps = (ProductService)arg0.getService(ProductService.NAME);
ps.setRetainedProductBeanProperty(ps.DEFAULT_PRODUCT_SOURCE, "bean_ID of bean you are changing", "displayName", displayname);
}
Hopefully this will help others.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 30, 2006
09:03 AM
Your original question was to Change it in the Add/Remove Programs - I didn't realize you wanted it changed throughout!!! Could have answered this a few replies ago! 🙂
Yes - by changing it the way you are will change it Everywhere - not just in the Add/Rem Prog! It will also change your install location, that is if your using the default install location!
Regards,
Tom
Yes - by changing it the way you are will change it Everywhere - not just in the Add/Rem Prog! It will also change your install location, that is if your using the default install location!
Regards,
Tom
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 30, 2006
10:43 AM
I did not notice that it changed it everywhere until you mentioned it, probably because I am not using the default install location. Now from one screen to the next in the Installer the name of the application being installed changes.
I did just want the name in the add/remove programs to change, not everything else. The solution I posted was what Macrovision support suggested I do. :confused:
Thanks for pointing out that it changes everywhere, now I'm not sure that support's solution was what I wanted.
I did just want the name in the add/remove programs to change, not everything else. The solution I posted was what Macrovision support suggested I do. :confused:
Thanks for pointing out that it changes everywhere, now I'm not sure that support's solution was what I wanted.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 31, 2006
11:00 AM
It has nothing to do with the default install location!! You use the ProductService to change the properties of your features components and stuff like that - when you change the displayName property using this method - you are actually changing the Name Property for the Product!!
Could you not get the reg file to work? I think this would be your best bet! What was your original reasoning for doing this anyway!!
Could you not get the reg file to work? I think this would be your best bet! What was your original reasoning for doing this anyway!!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 09, 2007
07:27 AM
I am revisiting this issue again and was wondering if anyone had any advice for me. I am trying to use the registry entry and code that was given in the beginning of this post.
For some reason the setvariableValue does not seem to set the variables in my registry file. I get the values to come up in Message boxes during the install but the registry keys do not seem to be updated. I put $V(valuename) in the registry key that is being run by the installer. I also tried just updating a file during the install with this value and that would not work either. Any ideas????
Thanks
For some reason the setvariableValue does not seem to set the variables in my registry file. I get the values to come up in Message boxes during the install but the registry keys do not seem to be updated. I put $V(valuename) in the registry key that is being run by the installer. I also tried just updating a file during the install with this value and that would not work either. Any ideas????
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 15, 2007
09:42 PM
Can you post your RegFile and where you are setting it!
I add my reg file by adding a 'Windows Registry Update' Action to a component. The regfile looks like this; there is more like Publisher, URLInfoAbout etc... but there's no vars with those so for your purpose:
[CODE]
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$V(HASHKEY)]
"DisplayIcon"="$V(ICON)"
[/CODE]
Hope this helps!
Regards,
Tom
And I am setting it by adding a Custom Action in the Sequence AFTER the Destination dialog box:
I add my reg file by adding a 'Windows Registry Update' Action to a component. The regfile looks like this; there is more like Publisher, URLInfoAbout etc... but there's no vars with those so for your purpose:
[CODE]
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$V(HASHKEY)]
"DisplayIcon"="$V(ICON)"
[/CODE]
Hope this helps!
Regards,
Tom
And I am setting it by adding a Custom Action in the Sequence AFTER the Destination dialog box:
public void onExecutingAddRemoveIcon(com.installshield.event.wizard.WizardActionContext arg0)
{
try {
String icon = arg0.resolveString("$PATH($P(AddRemoveIconFiles.absoluteInstallLocation)/TS_icon.ico)");
String installLocation = arg0.resolveString("$P(absoluteInstallLocation)");
installLocation = FileUtils.normalizeFileName(installLocation, '/');
String uid = arg0.resolveString("$P(Product_Bean.key.UID)");
int hash = installLocation.hashCode();
String uidandhash = uid + hash;
arg0.getServices().getISDatabase().setVariableValue("HASHKEY",uidandhash);
arg0.getServices().getISDatabase().setVariableValue("ICON",icon);
} catch (ServiceException se) {
arg0.logEvent(this,Log.ERROR, se.getMessage());
} catch(ISDatabaseException e){
arg0.logEvent(this,Log.ERROR, e.getMessage());
}
}