cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Michael_K
Level 2

Change shortcut properties by VBScript

Hello.
Sorry for my English - I'm from Eastern Europe 🙂
I have Express version of InstallShield and want to create simple project for my program. I want to do "tricky" thing: for each my feature (in my msi project) I want to create specific shortcut to my program (with a particular argument). For example:
- If user select "Feature 1" I want to create shortcut with argument "Feature 1";
- If select "Feature 2" - shortcut with argument "Feature 2" etc.
As I understand it is possible with VBScript: get feature name which currently selected and change property of shortcut. But I can't found how to get feature name (enumerate Session.FeatureRequestState ??) and how to set specified shortcut property (argument).
I hope somebody in this forum can help me.
Thank you in advance!
Labels (1)
0 Kudos
(2) Replies
DLee65
Level 13

Why not create the shortcuts under each feature, or is the issue that the same component is installed under each feature and you need a unique name for the shortcut even if it points to the same file?

I think you can accomplish what you want without having to create a custom VBScript action to modify the shortcut name.
0 Kudos
Michael_K
Level 2

DLee65 wrote:
Why not create the shortcuts under each feature, or is the issue that the same component is installed under each feature and you need a unique name for the shortcut even if it points to the same file?

I think you can accomplish what you want without having to create a custom VBScript action to modify the shortcut name.


I need a unique name for the each shortcut for each feature but the target is the one file.
I have "feature1", "feature2", "feature3" , and I have myprog.exe. I need shortcut to myprog.exe with argument "feature1" or "feature2" or "feature3" according selected feature.
I tried to copy myprog.exe to each feature in the tab "Files and Features" (and delete/no-delete from Allways Install) and create shortcut for each feature. But shortcuts had only one feature - first feature where I copied myprog.exe. 😞
0 Kudos