Dhananjay
4/9/2008 1:55:00 PM
Hi All,
[ This post is related to COM addin, but the same problem happens when
I created a project using installer class & incorporated that project
into my existing windows application project.]
I have created one Outlook addin using VSTO SE / VB 2005 / Outlook
2007. To set the security of my addin I added the output of
SetSecurity project in custom actions (As described on MS site). I
created a setup using same solution's Setup project. I set
DetectNewerInstalledVersion & RemovePreviousVersions properties of
Setup project to True. Lets say I Installed current version of Setup
viz. 1.0.0 on my machine in <ProgramFilesFolder>\Trial, now I want to
remove this version from my machine when I will install the next
version of the same setup. So I incremented the version of Setup to
1.0.1 & changed the product code accordingly. I installed that setup
on existing installed setup 1.0.0. Now if I install this version 1.0.1
to the same directory then it is working perfectly. But while
installing 1.0.1 if I choose another directory to install say,
<ProgramFilesFolder>\TrialAnother, then I get SetSecurity error -
Could not find the file c:\program files\Trial
\SetSecurity.InstallState.
For further curiosity, I gave messageboxs in Install, Rollback &
Uninstall methods of both version's SetSecurity project & rebuild both
versions again. Now I was thinking that, when I will install fresh
version of 1.0.0, I will see the messageboxes in 1.0.0's install
method. Yaa! I saw those messageboxes. But when I install 1.0.1
version on 1.0.0, I saw messageboxes in 1.0.0's uninstall method &
after that again messageboxes in 1.0.0's install method!!!!
So please can anybody faced same problems? Any solutions?
Thanks in advance,
Dhananjay