255 Limit on arguments in shortcut - Advanced Installer Community
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

255 Limit on arguments in shortcut

Why is this limit imposed?

I need to get a string (containing values of various properties) passed to a script via a shortcut but now find that a) The field is too short for my purposes and b) A user defined property is pseudo-formatted and therefore I cannot jut use one of those as the arguments are substituted at build time not run time.

How can I achieve this without shortening the names of the properties involved?

Regards,
John
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Re: 255 Limit on arguments in shortcut

It seems, maybe, there is a way around this by using Set Property with Formatted and then using that property as the input to the shortcut?

Would you say that is feasible?

John
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: 255 Limit on arguments in shortcut

Hi John,

Please keep in mind that this is an Operating System limitation. The maximum command line argument for a shortcut is 259 characters.

So, you can try to set property with formatted as you mentioned, but I'm afraid that it will also not work.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jusher
Posts: 195
Joined: Thu Dec 22, 2011 12:00 pm

Re: 255 Limit on arguments in shortcut

Hi Eusebiu,

I think you will find that there is no such operating system limit. The arguments list is limited in AI by the fact that it supplies a 260 character edit box.

I did what I said and created a property set with formatted, with all the properties I required as it's value within a quoted string.

I then made this property the argument to the shortcut. This worked as I expected. Please don't change it!

Regards,
John
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: 255 Limit on arguments in shortcut

Hi John,

You're right, sorry for my mistake.

It seems that only the text displayed in the "Target" text field from the "Properties" dialog of a shortcut is limited to 259 characters by the Operating System, but if you can write a longer argument for that shortcut it will work. Thank you for correcting me.

If you also want to be able to edit this argument in Advanced Installer you can follow the steps below:
- go at the following path "C:\Program Files (x86)\Caphyon\Advanced Installer 10.3\fragments\"
- open the "Validation.aip" file in a text editor and search for the following row:

Code: Select all

<ROW Table="Shortcut" Column="Arguments" Category="Formatted" Description="The command-line arguments for the shortcut." Options="1" ColumnType="1" ColumnIndex="5" ColumnSize="255"/>
- set the "ColumnSize" to "0" and save it
- reopen your .AIP (project file), go in the Table Editor page, "Shortcut" table
- select your shortcut, double-click in the "Argument" column and edit your argument as you please

Let us know if this helped.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”