I've been working part time with WIX for a short time and I just began using 
DTF to include a custom action in our install kit. I'm using an immediate 
custom action and I just want to be able to read a file that has been installed 
by a previous installation in the case of a major upgrade to extract some 
information. However, whenever I try to access the file, the path is internally 
modified by the method's call (config.Load(path); in the code below but all 
methods I'm using seem to do this ) resulting in a none existing path. I think 
it's due to the way DTF execute the CLR "out-of-process" but I don't seem to 
understand how it's work... Could someone explain what is happening and if what 
I want to do is possible ? Since I'm not able to find any information 
concerning my problem I'm beginning to think that the solution is simple and 
that I'm missing something.

Thanks

Nicolas

Here is the concerned part of the log :

Action 11:17:51: BackUpSearchInterfaceWebConfig.
Action started 11:17:51: BackUpSearchInterfaceWebConfig.
MSI (s) (58:64) [11:17:51:986]: Creating MSIHANDLE (18) of type 790542 for 
thread 356
MSI (s) (58:C0) [11:17:51:986]: Invoking remote custom action. DLL: 
C:\Windows\Installer\MSI7FE0.tmp, Entrypoint: BackUpSearchInterfaceWebConfig
MSI (s) (58!44) [11:17:52:189]: Creating MSIHANDLE (19) of type 790531 for 
thread 3908
SFXCA: Extracting custom action to temporary directory: 
C:\Windows\Installer\MSI7FE0.tmp-\
MSI (s) (58!44) [11:17:52:189]: Closing MSIHANDLE (19) of type 790531 for 
thread 3908
MSI (s) (58!44) [11:17:52:251]: Creating MSIHANDLE (20) of type 790531 for 
thread 3908
SFXCA: Binding to CLR version v2.0.50727
MSI (s) (58!44) [11:17:52:251]: Closing MSIHANDLE (20) of type 790531 for 
thread 3908
MSI (s) (58!44) [11:17:52:470]: Creating MSIHANDLE (21) of type 790531 for 
thread 3908
Calling custom action 
ManagedInstallerLib!ManagedInstallerLib.ManagedInstallerLib.BackUpSearchInterfaceWebConfig
MSI (s) (58!44) [11:17:52:470]: Closing MSIHANDLE (21) of type 790531 for 
thread 3908
MSI (s) (58!44) [11:17:52:517]: Creating MSIHANDLE (22) of type 790531 for 
thread 3908
cadata : C:\Program Files\Coveo Enterprise Search 6\Web\Web.config
MSI (s) (58!44) [11:17:52:517]: Closing MSIHANDLE (22) of type 790531 for 
thread 3908
MSI (s) (58!44) [11:17:52:517]: Creating MSIHANDLE (23) of type 790531 for 
thread 3908
MSI (s) (58!44) [11:17:52:517]: Closing MSIHANDLE (23) of type 790531 for 
thread 3908
MSI (s) (58!44) [11:17:52:517]: Creating MSIHANDLE (24) of type 790531 for 
thread 3908
xml doc created
MSI (s) (58!44) [11:17:52:517]: Closing MSIHANDLE (24) of type 790531 for 
thread 3908
MSI (s) (58!44) [11:17:52:533]: Creating MSIHANDLE (25) of type 790531 for 
thread 3908
Could not find file 'C:\Windows\Installer\MSI7FE0.tmp-\C:\Program Files\Coveo 
Enterprise Search 6\Web\Web.config'.
MSI (s) (58!44) [11:17:52:533]: Closing MSIHANDLE (25) of type 790531 for 
thread 3908
MSI (s) (58:C0) [11:17:52:548]: Closing MSIHANDLE (18) of type 790542 for 
thread 356
Action ended 11:17:52: BackUpSearchInterfaceWebConfig. Return value 3.
Action ended 11:17:52: INSTALL. Return value 3.

And here is part of the code... Quite simple really...

    string path = p_Session["MANAGED_SEARCHWEB_CONFIG_PATH"];
                p_Session.Log("cadata : " + path);

                XmlDocument config = new XmlDocument();
                p_Session.Log("xml doc created");

                config.Load(path);
                p_Session.Log("xml doc loaded");

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to