Page 1 of 1

File Name Length Limit

Posted: Wed Aug 05, 2009 12:26 pm
by GregS
We're having a problem in our installer. Maybe someone can help me figure out what's the issue. We are using InstallAware 8.

We are creating a file bag using this command:

Define File Bag : Y:\\Output\\MSISources\\iserverconfiguration\\*, include files recursively

One of the subfolders under this path has 29 subfolders, each of which holds two files.

Here's the problem: One of the files in one of these subfolders is missing from the file bag. When we run the installer, the file doesn't show up in the temporary folder where files are unpacked. We also looked inside the installer EXE using a zip file archive manager and we see that this one file is not even included in the file bag. However, the file is present in the source folder where InstallAware goes to retrieve the files to put into the file bag when the installer is compiled. So for some reason InstallAware fails to include this file in the file bag.

To me it appears that the file is being skipped because its filename is too long. The file's name is 34 characters long (not counting the file extension). It is the longest filename we have. There is also a 32 character filename which is being included in the file bag successfully.

As a test, we shortened the file name by a few characters and rebuilt the installer. With the shortened name, the file gets included in the file bag properly. Note that we also shortened the folder name too, but I don't think this was causing the problem.

So my questions are:
(a) Is there a limit on the length of filenames that InstallAware 8 can handle when building file bags?
(b) If so, is there a fix or workaround to the problem?

We can shorten the name if we have to, but we'd prefer not to. We name these files according to a naming scheme and we'd prefer not to depart from that scheme.

Thanks,
Greg S.

Posted: Wed Aug 05, 2009 1:05 pm
by MichaelNesmith
Its not the name, but the total path length. It needs to be at most 256 characters.

Posted: Wed Aug 05, 2009 1:22 pm
by GregS
MichaelNesmith wrote:Its not the name, but the total path length. It needs to be at most 256 characters.
Our full path is 172 characters, including the file name.

Posted: Wed Aug 05, 2009 4:57 pm
by MichaelNesmith
But does your output path cause you to exceed that size?

Posted: Thu Aug 06, 2009 9:25 am
by GregS
MichaelNesmith wrote:But does your output path cause you to exceed that size?
Let's assume for the moment that the answer to this is "yes". Would that prevent the InstallAware compiler from including the file in the file bag when it builds the installer EXE? Because the file isn't even making it into there.

GregS.

Posted: Thu Aug 06, 2009 9:38 am
by GregS
MichaelNesmith wrote:But does your output path cause you to exceed that size?
The actual answer is probably "no" but the situation is complicated:

* The file that isn't making it into the file bag is part of a set of files that never actually get "installed" in the conventional sense. They are data files, and the only place they're "installed" to is to the temporary folder where InstallAware unpacks the files. From there our installer runs a utility that uploads the data from these files into one of our server application's databases. After that the files are no longer needed so we don't actually install them anywhere. It's quite possible that the path length of the temporary folder where these files are stored is longer than 256 characters, but that would be the only output path where that could be the case.

* Something else also occurred to me. Our input path is 172 characters because it is given in terms of a virtual drive Y:. This is actually a mapping to a folder on our D: drive (using the "subst" command). If InstallAware is "translating" the path back into its original D: drive path, it would add about 50 characters to the path length. Still well under 256, but approaching it. I doubt this is the problem but I thought I'd mention it.

GregS

Posted: Thu Aug 06, 2009 11:53 am
by GregS
Update: I'm thinking that the input path length may well be the issue, even though it's a lot shorter than 256 characters. We did a test where we shortened the path length by temporarily eliminating one of the intermediate folder layers, and the problem disappeared. This was with the original 35 character filename, so it also means that the length of the file name itself is not the issue.