View Full Version : Shortcut arguments at runtime

05-24-2004, 02:34 PM
A have a number of shortcuts for my application, all which need to have a command-line argument specified during setup. Shortcuts were created with the wizzard.

The parameter is from a textbox that is shown during setup. All shortcuts needs the same parameters.

How do I loop through all shortcuts and add the parameter?

I know that I can use the AddFolderIcon method to add icons, but I would prefer not to, if possible.


05-24-2004, 02:43 PM
Parameters to shortcut is recorded in Arguments column of Shortcut table (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/shortcut_table.asp). Argument column is of Formatted data type. You can use a property in the column, and set the property with the value from the Edit control.

05-24-2004, 02:54 PM
I'm creating a Standard Project, not a Basic MSI Project.
Your suggestion is for the MSI Project, right?

05-24-2004, 03:04 PM
It is applicable to both project types.

05-24-2004, 03:16 PM
OK, I found the table in the Direct Editor - Thanks.

But how do I manipulate the table from code (I've been away from the Installshield-scene for a few years)
The help didn't help me much :confused:

05-25-2004, 05:07 PM
You will be able to set a property from InstallScript by using MsiSetProperty. Please make sure the property used is a public property.

05-26-2004, 02:31 AM

Got it working. Once you know it, it's real simple.:)