I created a new INI file with 2 key values to return [AppDir]+[Source Dir]
and they return in long file names.(eg. C:\Program Files\MyProgram)I need them to return in short file names.(eg.C:\PROGRA~1\MYPROG~1)What is the best way to do this?
You can obtain the short names only for files not for folders. To obtain the short name of a file use this formatted: [!filekey] where the filekey is a key in the File table. Also note that this works only when it's used in the Value column of the Registry or IniFile tables.
Thank you for the respose to my problem.I tried what you suggested
"[!filekey]" and it didn't work.Resultslongfilenames.This it what I did just to make sure I did it right.I created a new INI file,New Section named "directories". Then I created New Key and Inserted refrence to a file and for value used "[!filekey]".Results came back longfilenames.I even tried for the value Insert refrence to windows installer properties\Configuation\Shortfilenames and got the same results so this approach won't work for me.
I was wondering if a script would work?Even though I never wrote a script in my life I'd give it a go with some guideance.
This is what I need to accomplish:
1-Get the value of the [APPDIR].
Sesssion.Property("APPDIR") = "Value1"
2-Get the value of [SOURCEDIR]
Sesssion.Property("SOURCEDIR") = "Value2"
3-Convert value to [SHOTFILENAMES]
strProperty = Sesssion.Property("SHORTFILENAMES")
Create a file (Myprog.cfg) with a section [directories]
and 2 keys InstallFromDir=[SOURCEDIR] eg: G:\MYPROG~1
InstallToDir=[APPDIR] eg: C:\PROGRA~1\MYPROG~1
Any help with this would be greatly appericated and thank you again for your response.
FOLLOW US
Get the latest news in Application Packaging