Create an immediate custom action that calls GetPrintProcessorDirectory() and sets the property PrintProcessorDirectory with that location (appending it with a "\" character if it doesn't already end with one). Schedule that custom action in the InstallExecuteSequence table someplace before CostInitialize.
Add the following code to your authoring: <Component ...><!-- The component that installs the print processor dll --> ... <File ...><!-- The print processor dll --> <CopyFile Id="CopyPrintProcessor" DestinationProperty="PrintProcessorDirectory" /> </File> ... Schedule your deferred custom action that installs your print processor someplace after DuplicateFiles. -----Original Message----- From: David P. Romig, Sr. [mailto:d...@tcsc.com] Sent: Monday, July 05, 2010 12:25 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] How to copy a file to a variable location? I'm trying to install a print processor using WiX and a C# custom action. My custom action invokes the Win32 AddPrintProcessor() that expects the print processor DLL to already be copied to the proper folder. But different platforms store print processors in different folders. I can get the location of the folder for the target system from Win32 GetPrintProcessorDirectory() but how do I tell WiX to copy the DLL to the proper folder before WiX invokes the custom action? Thanks, Dave ---------------------------------------------------------------------------- -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users