[wix-users] Error in deleting deployed configuration from custom action
Blair Murri
osito at live.com
Thu Oct 19 01:25:39 PDT 2017
Do you perform a “health check” or “feature check” in your application's code? Are you using an advertised shortcut to start your application?
You may want to consider changing A’s MSI to install A.config where you want it instead of moving it.
Blair Murri
Sent from my Windows 10 phone
From: ರಾಘವೇಂದ್ರ ಎಸ್ via wix-users<mailto:wix-users at lists.wixtoolset.org>
Sent: Thursday, October 12, 2017 3:16 AM
To: WiX Toolset Users Mailing List<mailto:WIX-USERS at lists.wixtoolset.org>
Cc: ರಾಘವೇಂದ್ರ ಎಸ್<mailto:raghavendra.yadavs at gmail.com>
Subject: [wix-users] Error in deleting deployed configuration from custom action
Hi,
I have 3 msi's in a bundle chain. They are getting installed in below
directory:
C:\Program Files (x86)\MyDirectory\A
C:\Program Files (x86)\MyDirectory\B
C:\Program Files (x86)\MyDirectory\C
Now i have a configuration file(A.config) which resides in "A" directory. I
have written following custom action to move A.Config file from A to
MyDirectory so that all the 3 msi's can use common settings.
<CustomAction Id="CopyConfig"
BinaryKey="CustomActionBinary"
DllEntry="CopyConfigFile"
Execute="immediate"
Return="check"
/>
<InstallExecuteSequence>
<Custom Action="CopyConfig" Before="InstallFinalize">
NOT REMOVE
</Custom>
</InstallExecuteSequence>
[CustomAction]
public static ActionResult CopyConfigFile(Session session)
{
string srcPath = "C:\Program Files
(x86)\MyDirectory\A\A.config";
string destPath = "C:\Program Files
(x86)\MyDirectory\A.config";
File.Move(srcPath, destPath);
if(File.Exists(srcPath))
File.Delete(srcPath);
return ActionResult.Success;
}
From the log i can see that custom action run successfully and copy
A.Config from A to MyDirectory *and also deleted A.config in A*. After
finishing the installation A.config is getting regenerated again in the A
directory which i don't want.
Any help on how this config is regenerated again?
Warm Regards
Raghavendra S
9900495868
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list