Click here to Skip to main content
15,886,036 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a custom action which during upgrade,removes certain files before installFiles which puts the new files back.What I am noticing is the action is called 2 times.
1.Gets called and deletes the file.
2. InstallFiles copies the new files back.
3.Again gets called and deletes the file.(Should not happen).

My custom action looks like -

<InstallExecuteSequence>
			<RemoveExistingProducts After="InstallFinalize" />
			<Custom Action="NEWER_VERSION_PRESENT" After="FindRelatedProducts">
         NEWER_VERSIONS
			</Custom>
			<Custom Action="DeleteourFiles" Before="InstallFiles"></Custom>
</InstallExecuteSequence>


What I have tried:

I read somewhere that for upgrade scenario this custom action gets called twice.I want to know how to prevent it getting called for the second time.
Posted
Updated 21-Sep-17 21:48pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900