SOURCEDIR property in MSI package refers to the location from where the MSI is installed in the machine. How do we use this property in our package.
If you want to use a file which is kept in the source folder (next to where your MSI is placed), through Custom Action then you need to follow this procedure.
The SOURCEDIR cannot be directly used in the package. If you read the logs then SOURCEDIR property is created and correctly pointed to the directory. But later the log shows that: Deleting SOURCEDIR... So the value of this property is deleted and the MSI does not get access to it. If you display message with [SOURCEDIR] property then it will be empty.
The work around for this is that we can put an Action in the sequence called: "ResolveSource" after CostFinalize action. Then if you place your Custom Action after this action which refers to SOURCEDIR property then you will get the correct value of SOURCEDIR.
Acknowledgement: I would like to thank my friend, Anurag, here who helped me to figure this out.... :)
This Blog is for all people working or related to the MSI and App-V. There are lots of issues we face in everyday work regarding the technology. The sole purpose of my blog is to help others with whatever I learn. All you people out there, please help by commenting, voting, propagating and sharing my blog with your friends and colleagues but with due credit and acknowledgement to the material posted here with my name and blog url as I still do hold the copyright of the posts here.
2 comments:
how to address this for Installers being developed by VS 2008.
The drawback to adding the ResolveSource action however, is that if the source is no longer available in that location, then the user is presented with a dialog asking them to point to the source location. It is a best practice to reduce the dependency on the original source. http://msdn.microsoft.com/en-us/library/windows/desktop/bb204770%28v=vs.85%29.aspx#reduce_update_sources
Post a Comment