By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,276 Members | 1,452 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,276 IT Pros & Developers. It's quick & easy.

Uninstall problems with Office PIA

P: n/a
Hello,

I've developed a solution with VS2003, which automates Excel XP. I created a
setup project featuring install of the Primary Interop Assembly
'microsoft.office.interop.excel.dll' in the GAC. I added a condition: If the
dll already exists (correct version) in the GAC then a new install will be
canceled. This condition run. But if I uninstall my program, the entry in the
GAC will be removed. Why?
Nov 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a

"Maik" <Ma**@discussions.microsoft.com> wrote in message
news:B1**********************************@microsof t.com...
Hello,

I've developed a solution with VS2003, which automates Excel XP. I created
a
setup project featuring install of the Primary Interop Assembly
'microsoft.office.interop.excel.dll' in the GAC. I added a condition: If
the
dll already exists (correct version) in the GAC then a new install will be
canceled. This condition run. But if I uninstall my program, the entry in
the
GAC will be removed. Why?


You should not add the condition, just add the assembly to the GAC, if this
version is already installed it's reference count will be incremented. So
when you uninstall you won't delete the assembly from the GAC, you only
decrement the reference count.

Willy.
Nov 17 '05 #2

P: n/a
I've solved the problem. But I have another Question. How can I check if my
assembly in the GAC is used by another program? I use this information for
the uninstall procedure.
Nov 17 '05 #3

P: n/a
Thanks. I've deleted the condition. The setup runs perfect.

I have thought out following setting. I install a new Primary Interop
Assembly with my setup. After two weeks a second program refers to this
assembly. If I uninstall my program, will the assembly be removed from the
GAC?

Maik
Nov 17 '05 #4

P: n/a

"Maik" <Ma**@discussions.microsoft.com> wrote in message
news:5C**********************************@microsof t.com...
I've solved the problem. But I have another Question. How can I check if
my
assembly in the GAC is used by another program? I use this information for
the uninstall procedure.


You don't have to care about it, each GAC assembly is ref counted, when you
install an assembly (same version) it's counter is incremented if already
present else it's set to 1.
If you uninstall the ref counter is decremented and the assembly will be
removed when the ref counter reaches 0.

Willy.
Nov 17 '05 #5

P: n/a
Thanks a lot for helping me Willy.

Greeting from Austria
Maik

"Willy Denoyette [MVP]" wrote:

"Maik" <Ma**@discussions.microsoft.com> wrote in message
news:5C**********************************@microsof t.com...
I've solved the problem. But I have another Question. How can I check if
my
assembly in the GAC is used by another program? I use this information for
the uninstall procedure.


You don't have to care about it, each GAC assembly is ref counted, when you
install an assembly (same version) it's counter is incremented if already
present else it's set to 1.
If you uninstall the ref counter is decremented and the assembly will be
removed when the ref counter reaches 0.

Willy.

Nov 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.