INSTALLDIR must be persisted if you want to access it outside first-time installation. This is usually done through ARPINSTALLLOCATION. http://robmensching.com/blog/posts/2011/1/14/ARPINSTALLLOCATION-and-how-to-se t-it-with-the-WiX-toolset
-----Original Message----- From: Ingo Fischer [mailto:ingoderfisc...@hotmail.com] Sent: 15 November 2012 13:12 To: wix-users@lists.sourceforge.net Subject: [WiX-users] Lost INSTALLDIR on uninstall if no Component as childof Directory Hello, I use CustomActions like ... ExeCommand='DoSomethingWith [INSTALLDIR]someFile.txt'they are called on installation and uninstallation...After='InstallFinalize'>NOT REMOVE</Custom> <= for install ...Before='RemoveFiles'>Installed AND NOT REINSTALL</Custom> <= for uninstall my Directory Def:<Directory Id='TARGETDIR' Name='SourceDir'> <Directory Id='ProgramFilesFolder' Name='PFiles'> <Directory Id='DirectoryManufacturer' Name='Company Name'> <Directory Id='INSTALLDIR' Name='Product Name'> <Merge Id='MergeTestApplication' Language='1033' SourceFile='TestApplication.msm' DiskId='1' /> </Directory> </Directory> </Directory> </Directory> see, there is no Component as child of any Dir, only a Merge-Element. At installation time I change the default installation path fromc:\Program Files\Company Name\Product Nameto c:\Program Files\Company Name\Banana installation works fine, I see (verbose log): PROPERTY CHANGE: Adding INSTALLDIR property. Its value is 'c:\Program Files\Company Name\Banana' on uninstall the INSTALLDIR is not set right. I see ( verbose log ):PROPERTY CHANGE: Adding INSTALLDIR.3086A185_F1DB_4B25_AC4C_7335D5768652 property. Its value is 'c:\Program Files\Company Name\Banana'. Where does the .3086A185_F1DB_4B25_AC4C_7335D5768652 comes from ?later in the log I see:PROPERTY CHANGE: Adding INSTALLDIR property. Its value is 'C:\Program Files\Company Name\Product Name'.So, INSTALLDIR ( without some GUID ) is set to the default path. of cause ... ExeCommand='DoSomethingWith [INSTALLDIR]someFile.txt' fails. someFile.txt not found on default path. If I add a dummy component to the Directory it works![...] <Directory Id='INSTALLDIR' Name='Product Name'> <Component Id='IdDummyComp' Guid='{89B2AED7-A40E-4E17-8FF4-414604D72C01}'> <File Id ='fooFile' Source='Files\foo.txt' /> </Component> <Merge Id='MergeTestApplication' Language='1033' SourceFile='TestApplication.msm' DiskId='1' /> </Directory> [...] Is that a bug or do I something wrong ? ----------------------------------------------------------------------------- - Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users SDL PLC confidential, all rights reserved. If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users