I've come to the conclusion that I have to convert to Wix 3.0 to use
this feature.  I've got my installer converted over to comply with the
exception of a couple ICE warnings that I may or may not fix.

 

I'm still having issues getting the 8.3 path, though.

 

I have 2 CustomActions.

 

The first sets a property using the [!FileId] syntax.

      <CustomAction Id="Get83InstallDir_Prep" Property="LONGMYEXE"
Value="[!MYEXE]" />

 

The second uses _splitpath_s to get just the directory part.

      <CustomAction Id="Get83InstallDir" BinaryKey="LicenseFileUtils"
DllEntry="Get83InstallDir" />

 

When I look in the log, I see that the value given by [!FileId] is not
an 8.3 path.

Action start 17:32:11: Get83InstallDir.

Get83InstallDir:  Enter Get83InstallDir

Get83InstallDir:  LONGMYEXE:C:\Program Files\Test Dir\my.exe

 

What should I be doing to get the 8.3 version of the path?

 

 

-----Original Message-----
From: Stefan Pavlik [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 03, 2007 9:57 AM
To: Rowland, Chris
Cc: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] How to get 8.3 path for INSTALLDIR

 

Hi,...

 

 

First of all - I do not know how to create short directory name (you

can try to write custom action).

 

But for [!FileId] - it is feature of MSI but it is related only to

files. It means that you cannot use it to create the 8.3 format of

directory.

 

I would use the Custom action which will read the property filled

with [!FileId] and then it will remove the filename from the end (

check the funciton splitpaht() ).

 

Regards

 

Stefan

 

[EMAIL PROTECTED] wrote:

> I'm trying to set an environment variable to be the value of
INSTALLDIR,

> but I need it to be the 8.3 style path.

> 

> 

> I saw an old mailing list thread about this topic that Rob responded
to

> with:

> 

>  

> 

>         >You could always just use "[!FileId]" to get the short name
of a file.

> 

>  

> 

> This thread was in the context of WiX 3.0, however.  When I try to do

> this with WiX 2.0, my environment variable ends up unset.

> 

>  

> 

> Is this a WiX 3 specific feature?

> 

>  

> 

> --Chris

 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to