What about using [Time]?
_______________________________________________________________
 FireGiant  |  Dedicated support for the WiX toolset  |  
http://www.firegiant.com/

-----Original Message-----
From: Soren Dreijer [mailto:dreijer+l...@echobit.net] 
Sent: Monday, March 10, 2014 3:38 PM
To: General discussion about the WiX toolset.
Subject: Re: [WiX-users] Generating a unique file name

> I don't know how you would go about Randomizing the Names, but as long 
> as the DestinationName contains a name different from the SourceName 
> the file name will be different after the copy completes.

Yes, that's pretty much the point of DestinationName. :) What I'm looking for, 
however, is a way to generate a unique temp file on the fly without having to 
shell out to a custom action that does this for me. The reason I want to do 
this is because I don't know what other files could potentially exist in the 
directory, so I want to just create a temporary unique file name similar to 
what GetTempFilePath() (
http://msdn.microsoft.com/en-us/library/windows/desktop/aa364991%28v=vs.85%29.aspx)
does.

It sounds like that might not be possible currently.

Thanks though!


On Mon, Mar 10, 2014 at 1:35 PM, Carter Young <ecyo...@grandecom.net> wrote:

> I don't know how you would go about Randomizing the Names, but as long 
> as the DestinationName contains a name different from the SourceName 
> the file name will be different after the copy completes.
>
> Quote:
> SourceName:
> If this attribute is not specified (and this element is not nested 
> under a File element or specify a FileId attribute) then the 
> SourceProperty attribute should be set to the name of a property that 
> will resolve to the full path of the source filename. If the value of 
> this attribute contains a "*" wildcard and the DestinationName 
> attribute is specified, all moved or copied files retain the file 
> names from their sources.
>
> Quote:
> DestinationName:
> In prior versions of the WiX toolset, this attribute specified the 
> short file name. Now set this value to the localizable name to be 
> given to the original file after it is moved or copied. If this 
> attribute is not specified, then the destination file is given the 
> same name as the source file. If a short file name is specified, the 
> DestinationShortName attribute may not be specified. If a long file 
> name is specified, the DestinationLongName attribute may not be 
> specified. Also, if this value is a long file name, the 
> DestinationShortName attribute may be omitted to allow WiX to attempt 
> to generate a unique short file name. However, if this name collides 
> with another file or you wish to manually specify the short file name, 
> then the DestinationShortName attribute may be specified.
>
>
>
> Quoting Soren Dreijer <dreijer+l...@echobit.net>:
>
> > Hey Carter,
> >
> > That's not quite what I'm after (unless I'm misreading the docs). I 
> > want the *destination* file name to be uniquely generated, and as 
> > far as I can tell from the docs, only a unique short name will be 
> > generated if one
> isn't
> > provided.
> >
> > Cheers,
> > SOren
> >
> >
> > On Mon, Mar 10, 2014 at 11:28 AM, Carter Young 
> ><ecyo...@grandecom.net
> >wrote:
> >
> >> I believe the SourceName Attribute is what you're looking for.
> >>
> >> http://wixtoolset.org/documentation/manual/v3/xsd/wix/copyfile.html
> >>
> >> Carter
> >>
>
>
>
>
> ----------------------------------------------------------------------
> -------- Learn Graph Databases - Download FREE O'Reilly Book "Graph 
> Databases" is the definitive new guide to graph databases and their 
> applications. Written by three acclaimed leaders in the field, this 
> first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the 
definitive new guide to graph databases and their applications. Written by 
three acclaimed leaders in the field, this first edition is now available. 
Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to