cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Short file name problem

Hi,

I have repackaged my application with IS Repackager.
One key in an .ini file points to "Program Files". The key appears in the inc file like this:
MyKey=_Short(%ProgramFilesFolder%\MyApp)

When I convert to an .ism file and build my MSI, the key value is not resolved to a short file name. It looks like

MyKey=_Short(%ProgramFilesFolder%\MyApp)

instead of

MyKey=C:\Progra~1\MyApp


I found no info about the _Short() command, and wonder how to make it work.

Can anyone help ?

Thanks
(3) Replies
There is an issue with converting a folder path from a long path name to short path name. You can write a VBScript custom action to do that at runtime. Below is a quick sample.
set FSO = CreateObject("Scripting.FileSystemObject")

' read ProgramFilesFolder property
set fo = FSO.GetFolder(Property("ProgramFilesFolder"))
' convert to short path name from long path name
' assign the short path name to a property
Property("SP_PROGRAMFILESFOLDER") = fo.ShortPath

set fo = nothing
set FSO = nothing
For more information, please refer to FileSystemObject on MSDN.
I have come across this. It only happened for a few keys so I changed them manually by getting the short file name by running the dir command from dos with the /x switch.

Otherwise you could set the SHORTFILENAMES property to 1. This is a brick in the face approach that would use short filenames for everything.
Thanks for your replies.
I think I will choose the first solution and store the SP name in a property.