Ideally configuration like this should be done at first run by your application. Your installer should deploy the config file in a safe place under your installation folder somewhere where it is not in use then it should be copied to the live location during configuration by the application. This way you can patch or update the config file without having the headache of working out if it has changed by the user. All the complex logic can go in your application.
Doesn't answer your question though. How are you accessing the public methods of the .exe from your custom action, it may this binding that's going a bit weird? -----Original Message----- From: paul.chor...@stfc.ac.uk [mailto:paul.chor...@stfc.ac.uk] Sent: 31 March 2014 16:06 To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Creating Isolated Storage for main assembly during it's install. Hello Carter, Thanks for your quick reply, unfortunately this does not work as the problem is not with the preconfigured XML file, but with which executable owns the ISO area after its created by the installer. (C# Custom Action or ISOTest.exe). This can be observed from the "store.AssemblyIdentity" property. The if (File.Exists("RemotingConfig.xml")) test was merely to test that the file was included in the project build. In a DEBUG build (where "store.AssemblyIdentity" = ISOTest) the C# Custom Action (separate project in the solution) creates an ISO area by calling the target assembly's "ISOTest.ExposeIsolatedStorage.GetIsolatedStorage()" method and produces an ISO which IS accessible to the ISOTest.exe application after installation. The Custom Action also copies the pre-configured "RemotingConfig.xml" file to that area. So everything is OK for this build. In a RELEASE build (where "store.AssemblyIdentity" = CustomAction) the C# Custom Action (separate project in the solution) creates an ISO area by calling the target assemblies "ISOTest.ExposeIsolatedStorage.GetIsolatedStorage()" method and produces its own ISO which is NOT accessible to the ISOTest.exe application after installation. The Custom Action also copies the pre-configured "RemotingConfig.xml" file to its own area, but obviously ISOTest.exe cannot access area. There is some difference between the DEBUG & RELEASE builds in VS that affects this which I cannot find or understand. Cheers, Paul -----Original Message----- From: Carter Young [mailto:ecyo...@grandecom.net] Sent: 31 March 2014 14:48 To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Creating Isolated Storage for main assembly during it's install. Change: try ... isoFileStream = new IsolatedStorageFileStream("RemotingConfig.xml", FileMode.Create, store); to: try ... isoFileStream = new IsolatedStorageFileStream(String.Concat(Application.StartupPath,"RemotingConfig.xml", FileMode.Create, store)); Or add: if not File.exists(String.Concat(Application.StartupPath,"RemotingConfig.xml") { file.create(String.Concat(Application.StartupPath,"RemotingConfig.xml") isoFileStream = new IsolatedStorageFileStream("RemotingConfig.xml",FileMode.Create, store); } else { isoFileStream = new IsolatedStorageFileStream("RemotingConfig.xml",FileMode.Create, store); } Carter ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Scanned by iCritical. ------------------------------------------------------------------------------ _______________________________________________ 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. This message has been scanned for malware by Websense. www.websense.com ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users