I know you're creating a Setup project. I said you need to create ANOTHER project, this time a Class Library. To it you add an InstallerClass. In that InstallerClass you handle the appropriate event. You then add that InstallerClass to your Setup project via the Custom Actions editor.