Oh, sorry, misread question. The answer is there is no way to do that. You already know the file's name so there isn't a way to look it up at runtime.
On Wed, Apr 10, 2013 at 2:51 PM, Alain Forget <afor...@cmu.edu> wrote: > Yes, that I know, but I *don't* want the directory. I only want the file's > name. For example, say some File element installs a file to > C:/My/Path/To/File.exe, I'd like some formatted string type thing to return > just "File.exe". > > -----Original Message----- > From: Rob Mensching [mailto:r...@robmensching.com] > Sent: April 10, 2013 17:27 > To: afor...@cmu.edu; General discussion for Windows Installer XML toolset. > Cc: David Watson > Subject: Re: [WiX-users] Referencing filenames (without full path) > anddirectories in formatted strings > > You can use [#ComponentId] to get the directory of the Component > containing the file. It's all laid out here: > http://msdn.microsoft.com/en-us/library/windows/desktop/aa368609(v=vs.85).aspx > > > On Wed, Apr 10, 2013 at 11:19 AM, Alain Forget <afor...@cmu.edu> wrote: > > > Yep, confirmed about directories being properties. Thanks...I > should have noticed it in my installer logs as well. Duh. > > I no longer need to get just a filename without its full path, but > in case I or someone else wants to do this in the future, how > could it be done? > > > > -----Original Message----- > From: David Watson [mailto:dwat...@sdl.com] > Sent: April 10, 2013 12:55 > To: afor...@cmu.edu; General discussion for Windows Installer XML > toolset. > Subject: RE: [WiX-users] Referencing filenames (without full path) > anddirectories in formatted strings > > Indeed, directories are properties. > > > http://blogs.msdn.com/b/robmen/archive/2006/10/17/deciphering-the-msi-directo > ry-table-part-7-directories-are-properties.aspx < > http://blogs.msdn.com/b/robmen/archive/2006/10/17/deciphering-the-msi-directo > ry-table-part-7-directories-are-properties.aspx> > > > -----Original Message----- > From: Alain Forget [mailto:afor...@cmu.edu] > Sent: 10 April 2013 16:02 > To: 'General discussion for Windows Installer XML toolset.' > Subject: Re: [WiX-users] Referencing filenames (without full path) > anddirectories in formatted strings > > Thanks for the reply. I thought the syntax "[dirA]" was only for > properties. > Does the Directory element also count as (or create) a property? > > -----Original Message----- > From: Rob Mensching [mailto:r...@robmensching.com] > Sent: April 10, 2013 10:38 > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] Referencing filenames (without full path) > and directories in formatted strings > > What about "[dirA]". The "[$dirA]" would be trying to get the > directory of a Component matching that Id, right? > > On Mon, Apr 8, 2013 at 4:00 PM, Alain Forget <afor...@cmu.edu> > wrote: > > > Hi all, > > > > Say we have the following structure: > > > > <Directory Id="dirA" Name="A"> > > <Directory Id="dirB" Name="B"> > > <Directory Id="dirC" Name="C"> > > <Component Id='compABCClass' Guid='MyGuid'> <File > Id="fileABCClass" > > Name="ABC.class" DiskId='1' > > Source="source/path/to/ABC.class" KeyPath='yes' /> </Component> > > </Directory> </Directory> </Directory> > > > > Then later on in the .wxs file, in Custom Actions, I want to > refer to > > the above file and directory A like so: > > > > <!-- Silently run the Java ABC.class file (see > > http://wix.sourceforge.net/manual-wix3/qtexec.htm ) --> > <CustomAction > > Id="Set_cmdRunABC" Property="cmdRunABC " > > Value=""java" -cp [$dirA] "[#fileABCClass]" > /> > > <CustomAction Id=" cmdRunABC" Execute="deferred" > BinaryKey="WixCA" > > DllEntry="CAQuietExec" Return="check" Impersonate="no" /> > > > > The problem lies with [$dirA] and [#fileABCClass]: > > > > 1) How can I specifically refer to an install directory location > path > > (to replace the "[$dirA]"), where no components are being > installed in > > that directory (but only in subdirectories, that have libraries > and > > stuff that ABC.class needs)? > > 2) How do I get a file's name *without* the full path (as is > returned > > by "[#fileABCClass]")? > > > > Thanks, and let me know if anything here isn't clear. > > > > Alain > > > > *************************************** > > Alain Forget, Ph.D. > > Postdoctoral Researcher > > CyLab, Carnegie Mellon University > > afor...@cmu.edu > > http://cups.cs.cmu.edu/~aforget/ > > *************************************** > > > > > > > > > > > ---------------------------------------------------------------------- > > -------- Minimize network downtime and maximize team > effectiveness. > > Reduce network management and security costs.Learn how to hire > the > > most talented Cisco Certified professionals. Visit the Employer > > Resources Portal > > http://www.cisco.com/web/learning/employer_resources/index.html > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > > ----------------------------------------------------------------------------- > - > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for > building apps and a phenomenal toolset for data science. > Developers can use our toolset for easy data analysis & visualization. Get > a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > ----------------------------------------------------------------------------- > - > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for > building apps and a phenomenal toolset for data science. > Developers can use our toolset for easy data analysis & visualization. Get > a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > SDL PLC confidential, all rights reserved. > If you are not the intended recipient of this mail SDL requests > and requires that you delete it without acting upon or copying any > of its contents, and we further request that you advise us. > SDL PLC is a public limited company registered in England and > Wales. Registered number: 02675207. > Registered address: Globe House, Clivemont Road, Maidenhead, > Berkshire SL6 7DY, UK. > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for > building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free > account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users