Try your approach using com.day.jcr.vault.packaging.InstallHook.
Usually, you should capture the click, do some thing and then call install or capture the click, install and then after success do something. You cannot both post at the same time. May be I misunderstood.