Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Generating 8.3 (Short string values) for string table entry


2 replies to this topic

deramor

deramor
  • Full Members
  • 187 posts

Posted 21 February 2018 - 19:23

Hello,

 

I am trying to set a string value through the Automation interface.  I am able to do so however my string is being used by the shortcut table as a display name.  This requires:

 

The display name is of the Windows Installer Filename data type. If the display name that you enter is not already in the 8.3 format, InstallShield uses the ShortName|LongName format for this setting. For example, if you enter My Product Name as the value in this setting, InstallShield sets the value to MyProd~1|My Product Name, or something similar, so that a short name is available at run time if needed.

 

I am yet unable to generate an 8.3 format name for a given string value.  I tried using a file system object to generate it but this requires there is actually a file by the name I am trying to convert.

 

I don't believe that the target machines will ever use this short file name but Installshield requires it. 

 

Does anyone have suggestions on how I would either:

1. generate this short file name/short string name

or

2. Make installshield not care about this missing information.

 

Edit:  This project was being upgraded from IS2015.  Apparently starting in 2016, additional string validation was introduced.

https://flexeracommu...en-Building-MSI


Edited by deramor, 21 February 2018 - 19:46.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 26 February 2018 - 10:33

I don't know if there's a Windows API to generate a short file name for an object that doesn't exist (because the numbers are used to make sure two files don't get identical names). I guess that leaves you with two options:

A) Create a temporary file with the desired longe name, then use the API funtction to get its 8.3 equivalent.

B ) Generate the short name yourself, by removing any blanks and other disallowed characters, then use the first 6 of the remaining letters and append ~1



Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 01 March 2018 - 01:54

I don't have time to test it, but maybe have a look in the WiX source code here:

https://github.com/w...CompilerCore.cs

 

Try to search for "public string GenerateShortName" and see if you find something useful in that function.


Regards
-Stein Åsmul