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: patching shortcuts
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
‎Jun 09, 2008
01:23 PM
patching shortcuts
I have a base product out in the wild. I am creating a patch for it. Our marketing guys want to update the menu shortcut names.
I am not sure how I would delete the short cut and then create the new one during the patch's re-install runtime.
Thanks Folks!
Bradley
I am not sure how I would delete the short cut and then create the new one during the patch's re-install runtime.
Thanks Folks!
Bradley
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 11, 2008
08:45 AM
Okay then from what I have found it looks like I neeed to remove the plug in with an uninstall action to the bean number of the existing short cut and then create a new plug in.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 11, 2008
04:09 PM
Techie42 wrote:
Okay then from what I have found it looks like I neeed to remove the plug in with an uninstall action to the bean number of the existing short cut and then create a new plug in.
Okay that did not work. I can create the new shortcuts but I can not remove the old shortcuts.
I did a seach and found Robert Dickau's thread about DesktopService. So I tried this but it does not find my displayname for the shortcut items.
I am trying...
import com.installshield.wizard.*;
import com.installshield.wizard.service.*;
import com.installshield.product.service.desktop.*;
public class RemoveShortcuts extends WizardAction
{
public void execute(WizardBeanEvent event)
{
try
{
DesktopService ds = (DesktopService)getService(DesktopService.NAME);
ds.removeDesktopItem("$UsersPrograms$\\Texas Instruments" , "Uninstall CCE v3");
ds.removeDesktopItem("$AllUsersPrograms$\\Texas Instruments" , "Code Composer Essentials v3");
ds.removeDesktopItem("$AllUsersDesktop$" , "Code Composer Essentials v3");
}
catch(ServiceException se) { System.out.println (se.getMessage());}
}
public void build(WizardBuilderSupport support)
{
support.putRequiredService(DesktopService.NAME);
}
}
When this runs it does not remove the shortcuts.
Also When I compile this I get a warning message:
Note: RemoveShortcuts1.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 11, 2008
04:19 PM
Please see the newest ISMP API javadocs: the two-argument removeDesktopItem method is deprecated in favor of a three-argument version, where the context ($Somewhere$) is a separate argument. Please see KB article Q112447, for example.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 11, 2008
04:58 PM
RobertDickau wrote:
Please see the newest ISMP API javadocs: the two-argument removeDesktopItem method is deprecated in favor of a three-argument version, where the context ($Somewhere$) is a separate argument. Please see KB article Q112447, for example.
From the KB I see:
service.removeDesktopItem("$AllUsersPrograms$", "folder", "name");
So for my example...
ds.removeDesktopItem ("$UserPrograms$" , "\\Texas Instruments\\Code Composer Essentials v3" , "Uninstall CCE v3")
Thanks!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 11, 2008
05:11 PM
From memory I'm not sure whether you need the \\ at the beginning of the subfolder name, but that generally looks right...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 13, 2008
12:45 PM
Yes that worked.
Thank you again Robert!
Thank you again Robert!