Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

260 characters limit in shortcut's targets Windows not MSI/Setup Limitation

3,892 views
Skip to first unread message

International Connections

unread,
Sep 25, 2003, 12:26:41 PM9/25/03
to
As far as I could test, it seems that 260 characters is the limit of a
shortcut's target: The command-line arguments for the shortcut in the
Shortcut table of the MSI (the Arguments column) may be truncated
after installation of the product in question. If the path is resolved
during installation, MsiVal2 and Orca do not give warnings during
validation.

If some products use the product path in the Target field of a the
shortcuts (more than once), depending of the product's path on the
users' machine the limit of 260 characters can be reached faster than
desired.

Also during localization some/most foreign languages like German,
French, Spanish, Italian, and so on... are about 30% longer; they may
over-pass the limit even though the corresponding English target field
of a their shortcuts would be fine.

Is there a way to have/enter more than 260 characters in the target
field of a shortcut?

http://contactez.net/portfolio.html

Kallely Sajan

unread,
Sep 25, 2003, 12:54:45 PM9/25/03
to
I can think of two options - 1. Use an advertised shortcut instead of the
regular windows shortcut. 2. Convert the path to short path before using it
to create shortcut. The Target colmun wil be something like [MYEXESHORTPATH]
--
Regards,
Sajan.

PS: Please don't send me direct emails, use the newsroom.

"International Connections" <assi...@contactez.net> wrote in message
news:9a3d4722.03092...@posting.google.com...

International Connections

unread,
Sep 25, 2003, 6:50:12 PM9/25/03
to
Thanks Sajan,

Maybe I am not using advertised shortcuts as I should.
Or maybe I misunderstood your hints about converting the path to short
path.

I even tried to manually enter more than 260 characters in the target
field of an existing shortcut on my XP machine.
(Start > All Programs > Application Name > Shortcut > Right click >
Properties)

I could not manually type more than 260 characters (using the
Properties dialog box of an existing shortcut on my Start menu).

This is an example of the requirements for the contents of the Target
field of the shortcut I need to have after installation on the user's
machine:

"E:\Program Files\My_Product_Name_XYZ\Program\Target_Executable_To_Run.exe"
/v /s /g "E:\Program Files\My_Product_Name_XYZ\program" /p
"Other_Third_Party_Product_Name" /d "E:\Program
Files\My_Product_Name_XYZ\Program" /i "E:\Program Files\
My_Product_Name_XYZ\Program\NameOfInitilisationFile.ini"

In that case this target string is 292 characters long.

My_Product_Name_XYZ is the name of the application being installed.

Target_Executable_To_Run.exe is the name of the executable that the
shortcut should launch.

NameOfInitilisationFile.ini is the name of an initialisation file
required by the Target_Executable_To_Run.exe.

Other_Third_Party_Product_Name is the name of another required
application already installed on the user's machine.

If you could give me more helpful hints...

Hope to hear from you soon, your help is appreciated :O)

Regards

http://contactez.net/portfolio.html

"Kallely Sajan" <saj...@hotmail.com> wrote in message news:<O5lLSW4g...@TK2MSFTNGP09.phx.gbl>...

Kallely Sajan

unread,
Sep 26, 2003, 12:56:55 AM9/26/03
to
Interesting one. Even using an advertised shortcut will not do much good in
your case.
By short paths, Iwas actually asking you to use an 8.3 convention. For
example use C:\PROGRA~1 instead of C:\Program Files
That way you get to save some room.

Let me make general comment here. I think your application doesn't follow
the general conventions. It looks like all the arguments that you are
passing to the actual executable are configuration settings. Rather than
passing all of that as command line arguments, it should have been saved off
some where in the registry or a configuration file. The application should
have read the configuration info as and when necessary. That is what people
normally do.
--
Regards,
Sajan.

PS: Please don't send me direct emails, use the newsroom.

"International Connections" <assi...@contactez.net> wrote in message

news:9a3d4722.0309...@posting.google.com...

Andreas Magnusson

unread,
Sep 26, 2003, 3:12:46 AM9/26/03
to
OK, this is a wild chance but anyway; is your product by any chance using a
command line parser that can take a file as an argument? That way you don't
have to rewrite the product, just add all the options into one file that the
shortcut can point to. But I guess the odds are against you.

/Andreas


"International Connections" <assi...@contactez.net> wrote in message

news:9a3d4722.0309...@posting.google.com...

Michael Sanford [MVP]

unread,
Sep 26, 2003, 4:51:51 AM9/26/03
to
If you used shortnames as Sajan suggested, ypu might end up with something like
this:

"E:\Progra~1\My_Pro~1\Program\Target~1.exe" /v /s /g
"E:\Progra~1\My_Pro~1\Program\program" /p "Other_Third_Party_Product_Name" /d
"E:\Progra~1\My_Pro~1\Program\" /i "E:\Progra~1\My_Pro~1\Program\NameOfIn~1.ini"


Also, consider setting the Working Directory, then using relative paths. For
example, set the working folder to "E:\Program
Files\My_Product_Name_XYZ\Program". Then, your target would look like:

"Target_Executable_To_Run.exe" /v /s /g /p "Other_Third_Party_Product_Name" /d
/i "NameOfInitilisationFile.ini"
'But whether that app being run can handle that remeains to be seen...


--
R. Michael Sanford
Windows Installer MVP
+++++++++++++++++++++++++++++++++++++++++++++++++++++
ActiveInstall Professional 2.0 -- Windows Installer Made Simple!
Visit http://www.activeinstall.com and download a trial today!!!
+++++++++++++++++++++++++++++++++++++++++++++++++++++


"International Connections" <assi...@contactez.net> wrote in message

news:9a3d4722.0309...@posting.google.com...

International Connections

unread,
Sep 26, 2003, 11:46:40 AM9/26/03
to
Sajan,

I agree at 100% with you, this does not follow the general
conventions.
But this is out of my hands - I tried to hint the idea of a
configuration file/registry or anything in that direction, but I guess
is not for me to say... I have to create a setup and I guess I have to
take it like it is :O(

I do want to thank you for not only helping me on this matter but also
for confirming what would be a better approach. I will insist on
asking them to follow more general conventions.

Regards

http://contactez.net/portfolio.html

===========

"Kallely Sajan" <saj...@hotmail.com> wrote in message news:<eRcKwp#gDHA...@TK2MSFTNGP11.phx.gbl>...

International Connections

unread,
Sep 26, 2003, 11:57:48 AM9/26/03
to
Michael,

The relative paths approach with the Working Directory is another good
suggestion. But, like you, I am also doubtful if the application being
run can handle that... I will keep this suggestion in mind for other
situations. It will be worth using in some cases.

Thanks a lot and regards

http://contactez.net/portfolio.html

"Michael Sanford [MVP]" <msan...@activeinstall.com> wrote in message news:<uddExtAh...@TK2MSFTNGP09.phx.gbl>...

International Connections

unread,
Sep 26, 2003, 12:09:41 PM9/26/03
to
Andreas,

You gave me one more alternative to offer them.
I could easily create the file with all the arguments on the fly
during installation.
If I then hide the file from the user I would not take as much chance
to have the user/administrator delete the file by error.

As I said to the others who gave great suggestions, the odds may be
against me but this is one more option I can use in a different
situation.

All of this is a great learning experience.

I am pretty sure now I can get somewhere, all of these are good
ammunition to make my case :O)

Thanks a lot and warm regards.

http://contactez.net/portfolio.html

"Andreas Magnusson" <andreas_c...@hotmail.com> wrote in message news:<#CcMj2$gDHA...@tk2msftngp13.phx.gbl>...

Zweitze de Vries

unread,
Sep 29, 2003, 4:50:30 AM9/29/03
to
Assuming that Target_Executable_To_Run is hard to change:
Can't you create your own EXE file, that takes params from a config file (or
registry, or...), and starts a process Target_Executable_To_Run with all the
command-line parameters as required?
--
Zweitze de Vries
Cyco Software
Rijswijk, The Netherlands

"International Connections" <assi...@contactez.net> wrote in message

news:9a3d4722.0309...@posting.google.com...

International Connections

unread,
Oct 1, 2003, 10:20:46 AM10/1/03
to
Yes this also can be used to bypass the limitation and still answer
the requirements for that product. Being in the configuration
management, I gave them a bunch of suggestions and I am now waiting to
see how they are going to handle it.

I thank you for your help, it is appreciated.

http://gurleyalabama.contactez.net
http://contactez.net/portfolio.html

"Zweitze de Vries" <zweitze@at@cyco.nl> wrote in message news:<ejLDnYmh...@TK2MSFTNGP09.phx.gbl>...

0 new messages