\
Source Code
VBSCRIPT
VBSCRIPT Functions - For Imbedded VB
MakeSfnLfn()
Many Windows Installer tables contain columns that require a
filename to be specified in "8.3|long" file format or if the "long"
format is also valid as an 8.3 filename you don't need the "8.3|" bit.
This function can be called to build such a string and
takes these parameters:
- This is the name of a "namespace".
A filename must be unique within a name space and this value could be
the name of a directory (without path).
This routine will not generate the same 8.3 name for a namespace
within the span of a build.
- The file or directory name, if it contains a "|" then this value
is returned unchanged by this function, otherwise if the passed
value is not a valid 8.3 filename, one is generated and prepended
and returned.
All characters in both strings must only contain characters valid in
a Windows Long filename (no "\", ":" characters etc).
<$Table "Directory">
<$Row @Where="Directory = 'INSTALLDIR'" @OK='=1' *DefaultDir=^MakeSfnLfn("<$NewProductName>")^>
<$/Table>