MAKEMSI quickly and reliably creates MSI files in a non-programmatic way
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
[Bottom][Contents][Prev]: Html2Text()[Next]: TableExists()
Have your say! Join the MAKEMSI discussion list or view archive! Suggest improvements. No question too simple or too complex.
\->Source Code->VBSCRIPT->VBSCRIPT Functions - For Imbedded VB->MakeSfnLfn()

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:

  1. 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.

  2. 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).

EXAMPLE

<$Table "Directory">
    <$Row @Where="Directory = 'INSTALLDIR'" @OK='=1' *DefaultDir=^MakeSfnLfn("<$NewProductName>")^>
<$/Table>


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: Html2Text()[Next]: TableExists()


MAKEMSI© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Friday October 13 2017 at 2:08pm
Visit MAKEMSI's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.