Hi Riyaz, not exactly sure why you want to hard code it to the C:\ folder? Take a look at this as it might be what you want to do: http://www.dalun.com/wix/04.25.2007.htm Also you can do this: http://n2.nabble.com/How-to-Change-Default-Install-Location-td1092961.html
I haven't noticed that wix defaults it to the most free space drive either(could be always defaults to c for me), but if you use this structure below it should default it to programfiles folder as I think you want. >From wix help: WixUI_InstallDir does not allow the user to choose what features to install, but it adds a dialog to let the user choose a directory where the product will be installed. To use WixUI_InstallDir, you must set a property named WIXUI_INSTALLDIR with a value of the ID of the directory you want the user to be able to specify the location of. The directory ID must be all uppercase characters because it must be passed from the UI to the execute sequence to take effect. For example: <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder" Name="PFiles"> <Directory Id="TESTFILEPRODUCTDIR" Name="Test File"> ... </Directory> </Directory> </Directory> ... <Property Id="WIXUI_INSTALLDIR" Value="TESTFILEPRODUCTDIR" /> <UIRef Id="WixUI_InstallDir" /> Windows installer(msi) does not like when you use hard-code pathing thus the warning. But the pathing should work fine if you want to use it. 2009/4/25 Riyaz Mogharabin <moghara...@gmail.com> > Dear Friends, > > It seems that in WiX 3, the TARGETDIR is set to the local drive which has > the most free space on the system. > I need to hardcode this so the user will always see "C:\MyProgram\" as the > default install path. > For this, I've done the following: > > <Property Id='TARGETDIR' Value='C:\'/> > > And this is working properly. Yet, there is a warning: > > Warning LGHT1076 : ICE48: Directory 'TARGETDIR' appears to be hardcoded in > the property table to a local drive. > > Does anybody has an idea if this is going to have any harm on my installer? > > Regards, > > Riyaz > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensign option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users