Hi I've come up with the following plan
You harvest the temporary files needed for the installation...
<ItemGroup Label="TempBuildOutputPath">
<HarvestDirectory Include="..\..\..\BuildOutput\ProductName\Temp">
<SuppressRootDirectory>True</SuppressRootDirectory>
<ComponentGroupName>TempFilesComponentGroup</ComponentGroupName>
<KeepEmptyDirectories>True</KeepEmptyDirectories>
<DirectoryRefId>TempFolder</DirectoryRefId>
<SuppressRegistry>True</SuppressRegistry>
<PreprocessorVariable>var.TempBuildOutputPath</PreprocessorVariable>
<Link>TempFilesComponentGroup</Link>
</HarvestDirectory>
</ItemGroup>
You install the files to some temporary location...
<Directory Id="TARGETDIR" Name="SourceDir">
<!--Program Files-->
<Directory Id="ProgramFilesFolder">
<Directory Id="BINARIESINSTALLLOCATION"
Name="TheProduct"/></Directory>
</Directory>
<!--Installer Temporary Files-->
<Directory Id="TempFolder">
</Directory>
</Directory>
Pass the temp path folder to the custom action when executing....
<Property Id=" SomeCustomAction " Admin="yes"/>
<CustomAction Id="SetSomeCustomAction" Property=" SomeCustomAction " Value="[
TempFolder] " />
<CustomAction Id="SomeCustomAction" BinaryKey="DataActions.dll"
DllEntry="SomeAction" Execute="deferred" Impersonate="no"/>
<Custom Action="SetSomeCustomAction" After="InstallFiles"></Custom>
<Custom Action="SomeCustomAction"
After="SetUpgradeDatabaseCustomAction"><![CDATA[(NOT Installed)]]></Custom>
Then in the custom action access the files ....
[CustomAction]
public static ActionResult CreateDatabase(Session session)
{
var tempPath = session["CustomActionData"];
return ActionResult.Failure;
}
Is any better / best practice on how to do this kind of thing?
Kind regards,
Christoffel le Roux
-----Original Message-----
From: Vazhenin, Maksim [mailto:[email protected]]
Sent: Monday, August 27, 2012 11:16 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom action support files.
What are you trying to do? Perform an upgrade from product1.0 to product2.0?
-----Original Message-----
From: M.S. Mohideen [mailto:[email protected]]
Sent: Monday, August 27, 2012 1:00 PM
To: [email protected]
Subject: Re: [WiX-users] Custom action support files.
Hi,
I have tried using all kinds of installers to build an msi after modifying
original msi file. All the installers do build the msi file but when the
application is launched it returns a side-by-side configuration error message.
When I build the msi without making any changes to the original files it works
without any issues. The conclusion is that the msi can be only built with the
original files intact and any alterations (especially in the .dll files) does
not work.
One particular msibuilder software from emcosoft does build the msi properly
and the altered file also is copied to the application folder. However, when
the shortcut icon is clicked, instead of launching the application, it runs an
installation again and the modified file is replaced with the original file
thus bringing the application back to its original state loosing all the
modification done.
I fail to understand the need of an msi builder if we cannot make the required
changes. The original msi file can be used without having to go through the
whole exercise. Could somebody please help me out with this?
Thanks and best regards.
Mohideen.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat
landscape has changed and how IT managers can respond. Discussions will include
endpoint security, mobile security and the latest in malware threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users