How to modify installation directory to append extra folder to install directory in Wxs file
I am new WXS file creation and new to WIX MSI installer. I have problem for installation location directory appending dynamically with extra directories. 1) 1) Say user selected as installation directory as “C:\Sample\Test” (either by default path or user modified in the installation directory dialog). A2) And dynamically it should add 2 directories (i.e. /data/install/) to this installation location. i.e. if the user selects as “C:\Sample\Test” then final installation path should be as “C:\Sample\Testz\data\install” It is my requirement. 3) 3) And I am doing below way to append the directories and making my application installation directory to as “C:\Sample\Testz\data\install” (if user selects as “C:\Sample\Testz\”) <Publish Dialog="WebDialg" Control="Next" Property="MYAPPPATH" value="[FirstDir]\data\install order="1">1</Publish> 4) 4) And created the MSI and selected the installation location as “C:\Sample\Testz\” and it installed in “C:\Sample\Testz\data\install”. And also shortcut created to “C:\Sample\Testz\data\install”. And trying to launch the application it is launching fine. But again the installation path is changing to the path “C:\Sample\Testz” and also shortcuts also pointing to the path “C:\Sample\Testz\”. And if I try to launch it again it is not able to launch the application as its path has changed. 5) 5) And one more observation for the MSI. After creation of the MSI if I see the MYAPPPATH property in the MSI table (by tool ORCA). The path is pointing to the “C:\Sample\Testz” only. *Could you please help in this regards?* Below is some sample of my wxs file <Property Id='DiskPrompt' Value="My app Installation [1]" /> <Property Id="MYAPPPATH" Secure="yes"><![CDATA[C:\ Sample \Testz\]]></Property> <Property Id="WIXUI_INSTALLDIR" Value="MYAPPPATH" /> <Property Id="ALLUSERS">1</Property> .. <Directory Id='TARGETDIR' Name='SourceDir'> <!-- Removing below command as we are installing in defaule program files folder --> <!-- Mallik <Directory Id='ProgramFilesFolder' Name='PFiles'> --> <Directory Id='MYAPPPATH' Name='!(loc.Product_Title)!(loc.Product_EnvironmentName)'> <Directory Id='Config' Name='Config'> <Component Id='appName_CLIENT' Guid='{GUID}'> <RemoveFolder Id="PurgeAppFolder" On="both" /> <CreateFolder> <Permission User="Everyone" GenericAll="yes"/> </CreateFolder> <Environment Id="GUI_HOME" Action="set" Part="all" Name="GUI_HOME" Permanent="no" System="yes" Value='"[MYAPPPATH]"'/> <File Id='JNLP' Name='appLauncher.bat' DiskId='1' Source='Resources/desktopAppLauncher.bat' KeyPath='yes'> <Shortcut Id="menuStartappName" Directory="ProgramMenuDir" Name='!(loc.Product_MenuShortcutName)!(loc.Product_EnvironmentName)' WorkingDirectory='MYAPPPATH' Icon="appName.exe" IconIndex="0" Advertise="yes" Arguments= '"[MYAPPPATH]"'/> …. ..... .. And appending the directory structure (when user clicks on Next button on this dialog) in installation directory wxs dialog file as below <Control Id="InstallNoShield" Type="PushButton" ToolTip="Next" ElevationShield="no" X="4" Y="243" Width="80" Height="17" Default="yes" Hidden="yes" Disabled="yes" Text="Next"> ..... <Publish Property="MYAPPPATH" Value="[MYAPPPATH]\!(loc.Application_ShortName)\!(loc.Environment_ShortName)\" Order="1">1</Publish> </Control> -- Regards, Mallikarjun. keep smiling... ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users