PDA

View Full Version : Custom shortcuts



Tom H.
05-12-2011, 09:42 AM
I'm not having any luck trying to create custom shortcuts in the program group for my application. These are conditional shortcuts, only created for certain types of installs (a server install that gets extra admin utilities, etc.)

Is there an example somewhere of this? Can custom shortcuts be created in a program group?

Thanks,
Tom

linder
05-12-2011, 10:29 AM
Hi Tom,

Hmm, I fear I do not understand. What is a "custom shortcut" in this case?

You can use the Shortcuts Visualizer to create Shortcuts (in all "standard" locations) and you can use the "Create Shortcut..." script function to create Shortcuts wherever you want (including all "standard" locations).

Friedrich

Tom H.
05-12-2011, 10:56 AM
Sorry for being fuzzy -- it's early here.:)

I have added some script based custom shortcuts inside of an IF structure, based on the install type. The IF test is valid (a message displays inside of it), but the shortcuts just never appear in the Program Group for the program. Only the standard ones from the Visualizer are there.

I'm testing the install under Vista, if that makes a difference.

Second question: As part of this, I was trying to see if I could use 'Features' to determine whether the shortcuts would be created (so I could use the Shortcuts Visualizer.) I don't show a Features dialog, though, so is there a way to reference/toggle a 'Feature' strictly though the script? I see the 'If Feature' structure, but not a label/etc. that I can reference.

linder
05-13-2011, 01:33 AM
Hi Tom,

I hope I understood the question correctly :) I have attached a demo project that creates a "My Cool App" Program Group and adds a Shortcut to Notepad and the Uninstall from the Visualizer. Then it creates another Shortcut to Notepad from the Script (and I put a "If Feature" test statement around it).

Does this help?

Friedrich

Tom H.
05-13-2011, 08:41 AM
Okay, so it looks like I need to use a CSIDL variable to get to the right place. I was being tripped up by the visualizer generated shortcut saying "Programs\my folder" and was trying to do the same thing with my custom shortcut.

I see the 'If Feature' construct, but I still would like to know if there is a way to toggle that on/off with a script statement (as opposed to using the dialog.) For example, if it starts off with Install by default = 'Always', can I change that later on in the script to prevent installation.

Thanks,
Tom

linder
05-13-2011, 08:56 AM
Hi Tom,

Only the "Custom Install" dialog can manipulate the state of a Feature. You can't programmatically turn it on/off from the script in SB7 (but will be possible in SB8).

Friedrich

Tom H.
05-13-2011, 09:05 AM
Okay, looking forward to SB8.:)

Thanks again for the quick help.
Tom