Impossible to set label text of shortcut?

Got a problem you cannot solve? Try here.
Will
Posts: 21
Joined: Mon Jul 11, 2005 2:15 pm

Impossible to set label text of shortcut?

Postby Will » Thu Feb 02, 2006 2:01 pm

Here's what I need to have happen: the setup program must be able to allow the text label on the shortcut in the start menu to be configurable via a command line parameter. From what I've seen, the variables never resolve to their proper values when used in the Link Name field in the Create Shortcut popup box. Is this a bug that's been fixed in a more recent version of Installaware? (I'm using version 2005 first ed.)

Also, I need to pass several other parameters via the command line. Is it possible to set a variable other than CMDLINE via a command line parameter? The help file seems to imply that any arbitrary variable can be set, but this is not true, as only the 'system' variables can be set (like ADVERTISE, CMDLINE, etc). I realize I could have the functionality i want by using a comma-seperated list of variable values and parsing with the Parse String command in InstallAware. This seems rather complicated to me since setting a few properly named variables in the command line would be far more straightforward for me and much more importantly, for our customers.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Feb 02, 2006 2:18 pm

Hi Will!

Unfortunately the answer to the first question is no. You cannot use variables for the shortcut - this must be hard-coded at design time, this is a Windows Installer limitation. What you can do as a workaround is, if there are only a limited number of possibilities, use a different Create Shortcut command for each - and then branch at runtime using the If command.

As for the second question, in InstallAware v5.x, if you specify a variable value on the command line, and setup is running in silent mode, the variable will be locked in with that value for the entire duration of setup. If setup is not running in silent mode, a command line override has no effect - this was made because users were confused they could not override settings in the visual UI and thought of this as a bug.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Will
Posts: 21
Joined: Mon Jul 11, 2005 2:15 pm

Postby Will » Thu Feb 02, 2006 2:40 pm

In case anyone else is reading this thread with the same problem, my workaround for problem number #2 will be to write a function in a dll that will take the entire command line sent to the program (automatically stored in $CMDLINE$ by installaware) and do the parsing of the commandline itself, taking into the accound the bug where the first character of the command line is deleted occasionally (which was fixed in a later version than i have).

BobRoush
Posts: 27
Joined: Sat Aug 26, 2006 12:26 pm

Postby BobRoush » Tue Oct 10, 2006 7:48 pm

Please update the help file to properly explain that setting script variables on the command line only works with the /s option, silent mode. I just spent 4-8 hrs writing a script with the overall plan of making something happen if a user define variable was set on the command line. Now I see I have to write some more code to parse the command line myself. I may not have gone down this path if I had known this.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 232 guests