469,575 Members | 1,190 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

Uninstall problems with Office PIA

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
5 3181

"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
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
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

"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
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.

Similar topics

9 posts views Thread by Fan Ruo Xin | last post: by
1 post views Thread by JIMMIE WHITAKER | last post: by
5 posts views Thread by Bryan | last post: by
2 posts views Thread by pc | last post: by
reply views Thread by Nattydreadlock | last post: by
6 posts views Thread by =?Utf-8?B?bW9taWVfYmVhcg==?= | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.