Thanks for the replies Phil and Jacob. I would look and try to find a solution in the way that you have suggested.
But apart from this i have another requirement. Below is the code: <Property Id="CopyDestination" Value="C:\ProgramData\Energy Solutions International\PipelineOptimizer $(var.SvnVersion)"/> <Directory Id='TARGETDIR' Name='SourceDir'> <Directory Id='EnergySolutions' Name="Energy Solutions International"> <Directory Id='TORT' Name='PipelineOptimizer $(var.SvnVersion)'> </Directory> </Directory> </Directory> <Component Id="PreferencesFile" Guid="{A4E1FFCE-1534-43BF-AA2B-CDFD39381720}" Directory="TARGETDIR"> <File Id='preferences' Source='$(var.GuiPath)\screens\preferences.xml' KeyPath='yes'> <CopyFile Id='Copy_Prefs' DestinationProperty='CopyDestination' /> </File> </Component> <SetDirectory Id="EnergySolutions" Value="C:\Energy Solutions International"/> <Property Id="WIXUI_INSTALLDIR" Value="TORT" /> <UIRef Id="WixUI_InstallDir" /> While doing the installation if the user changes the install directory from the one that is default(it comes out as PipelineOptimizer 06.00.00) to some other name, the file being copied using the <CopyFile> attribute is still copied to the same directory under the programdata as the one which is defaulted in the UI which is to C:\ProgramData\Energy Solutions International\PipelineOptimizer 06.00.00. What i want though is that if the user changes the directory to say PipelineOptimizer 06.00.00 Test, then the file should be copied to the C:\ProgramData\Energy Solutions International\PipelineOptimizer 06.00.00 Test but this does not happen. Is there a way i can achieve the same. I tried using custom action to set the property "CopyDestination" but was not able to do so. Please let me know if there is a solution to this if possible with some sample code. Also is there a way in which we can create 2 prompts to the user during install. This would allow us to use the directory variable independent of the path so that we can use this approach for the ProgramData subfolder i. Prompt 1: The install path. For example, the default path is "C:\Energy Solutions International\". ii. Prompt 2: The install directory. For example, the default directory is "PipelineOptimizer 06.00.00". and then use the value of the install directory somehow to copy the file to right location. Is the above approach possible? Regards, Suvra Jyoti On 10-03-2014 21:44, Hoover, Jacob wrote: > I believe you'd have to look into "semi-custom" actions. Idea is at runtime > injecting new records into the needed tables just early enough so that > standard windows installer functionality does the heavy lifting. Note, you > need to ensure this happens in all instances for > install/upgrade/repair/remove and without having a UI sequence. You're also > going to need to utilize the "remember me" property pattern to be able to > restore the values. > > Is this doable, probably. Will it be easy, no. > > -----Original Message----- > From: Phil Wilson [mailto:phildgwil...@gmail.com] > Sent: Monday, March 10, 2014 10:40 AM > To: General discussion about the WiX toolset. > Subject: Re: [WiX-users] Fwd: How to have the shortcut name same as the > installation directory > > I don't believe this is possible using the standard shortcut creation > methods. The issue is that the underlying functionality is the Shortcut table > of the MSI file, and the name is not a variable that can be specified with a > property (it's not the Formatted type). That means you will need to invent > your own solution. You could use code to create the shortcuts, not something > anyone would recommend, or somehow modify the Shortcut table at install time, > --------------- > Phil Wilson > > > On Mon, Mar 10, 2014 at 2:47 AM, Suvrajyoti Panda <suvrajyo...@contata.co.in> > wrote: >> Adding on to this, i would like to use values supplied in the >> dialogues of the installer. Also i would like to use one dialogue for >> the installation path and the other for the installation directory. >> Please let me know how i can achieve this. >> >> Regards, >> Suvra Jyoti >> -------- Original Message -------- >> Subject: How to have the shortcut name same as the installation >> directory >> Date: Mon, 10 Mar 2014 14:55:10 +0530 >> From: Suvrajyoti Panda <suvrajyo...@contata.co.in> >> To: General discussion about the WiX toolset. >> <wix-users@lists.sourceforge.net> >> >> >> >> Hi All, >> >> I have the below directory structure: >> >> <Directory Id="TARGETDIR" Name="SourceDir"> >> <Directory Id="ENERGYSOLUTIONS" Name="$(var.rootFolder)"> >> <Directory Id='PFWLOCAL' Name="$(var.installFolder)"> >> </Directory> >> </Directory> >> <Directory Id="DesktopFolder" Name="Desktop"> >> <Component Id="PFWLocalClientShortcutDesktopCmp" >> Guid="{D24360C2-0D40-4CA9-BD9C-874D7DFEB5B1}"> >> <Shortcut Id="PFWLocalClientShortcutDesktop" >> Name="$(var.installFolder)" Target="[PFWLOCAL]PFWLocalClient.exe" >> Description='Launch Pipeline Framework' >> WorkingDirectory='PFWLOCAL' Icon='PFWLocalClientIcon.ico'> >> </Shortcut> >> <RemoveFolder Id="DesktopFolder" On="uninstall"/> >> <RegistryValue Root="HKCU" >> Key="Software\PipelineFramework" Name="PFWLocalClientShortcutdesktop" >> Type="integer" Value="1" KeyPath="yes"/> >> </Component> >> </Directory> >> </Directory> >> >> >> And i am using the built in WIX UI as below: >> >> <Property Id="WIXUI_INSTALLDIR" Value="PFWLOCAL" /> >> >> In the desktop shortcut i am creating above, i want that the name >> attribute of the shortcut be picked up same as the name of the >> directory the user wants to install to, for instance he might change >> the default directory, in that case the name of the shortcut should be >> same as the directory user has supplied. Please let me know how we can >> achieve the same. >> >> Regards, >> Suvra Jyoti >> >> >> >> ---------------------------------------------------------------------- >> -------- 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 > ------------------------------------------------------------------------------ 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