I'm using Installer Class in my MSI project which preforms some custom actions. Due to this class everytime I install the MSI it places .InstallState file into installation folder. I have another module in my project which performs uninstallation of existing application in Silent mode using existing application's product code. But its failing as it couldnt remove the .InstallState file. But if i manually uninstall it removes the file.
After installing the app i tried to delete this file within OnCommit() or Commit() methods of installer class using File.Delete(). But so far no luck.
Is there any way to exclude this file from MSI ?