Remove Unpinned Assemblies

Got a problem you cannot solve? Try here.
tzachk
Posts: 171
Joined: Wed Jul 18, 2012 12:14 am

Remove Unpinned Assemblies

Postby tzachk » Wed Nov 07, 2012 4:06 am

Hi Francesco,

I'm calling "Remove Unpinned Assemblies" after the Apply Uninstall command but the assemblies remains in the GAC.
I'm testing this on XP.

Any idea?

Regards,
T.

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Remove Unpinned Assemblies

Postby FrancescoT » Wed Nov 07, 2012 5:55 am

Dear Tzachk,

Are you sure those assemblies are not used by any other process?

"This command removes all assemblies installed by your application from the GAC. For the removal to succeed, the assemblies should be "unpinned", meaning they do not have any clients remaining on the system. For this reason, this command should be called after Apply Uninstall executes. The command will also be unable to remove any assemblies that are still in use by other installed applications."

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

tzachk
Posts: 171
Joined: Wed Jul 18, 2012 12:14 am

Re: Remove Unpinned Assemblies

Postby tzachk » Wed Nov 07, 2012 5:59 am

Hi Francesco,

These assemblies are coded by my company. It is not third party or the like.
When I call the "Remove Unpinned Assemblies" it is after the product uninstall ended.

If you can tell me which commands InstallAware are using, I can try to call it to see if I get any errors.

Regards,
T.

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Remove Unpinned Assemblies

Postby FrancescoT » Thu Nov 08, 2012 9:29 am

Dear Tzachk,

the IA command "Remove Unpinned Assemblies" resolves internally as "gacutil /u".

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

tzachk
Posts: 171
Joined: Wed Jul 18, 2012 12:14 am

Re: Remove Unpinned Assemblies

Postby tzachk » Sun Nov 11, 2012 2:56 am

Hi Francesco,

Does this means that the InstallAware installer includes gacutil.exe? Because you won't find this exe on target machines unless the .NET SDK is installed on client machines, which rarely happens.
If you don't have gacutil.exe included in your installer, then this might explain why Remove Unpinned Assemblies does nothing.

Waiting for your answer.

Regards,
T.

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Remove Unpinned Assemblies

Postby FrancescoT » Mon Nov 12, 2012 8:32 am

Dear Tzachk,

I can only confirm that the IA command "Remove Unpinned Assemblies" calls internally "gacutil /u" and I don't think that it is includes with the installer.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

tzachk
Posts: 171
Joined: Wed Jul 18, 2012 12:14 am

Re: Remove Unpinned Assemblies

Postby tzachk » Tue Nov 13, 2012 3:21 am

Dear Francesco,

What should I do with this answer? What you are actually saying is that "Remove Unpinned Assemblies" only works if the end user installed .NET SDK, which is usually not the case. With all due respect, this command should be removed or altered as it doesnn't function at all.
Do you have any other idea on what other users of InstallAware did to solve this issue?

Regards,
Tzach

tzachk
Posts: 171
Joined: Wed Jul 18, 2012 12:14 am

Re: Remove Unpinned Assemblies

Postby tzachk » Tue Nov 13, 2012 7:59 am

Hi Francesco,

To help others that might stumble on the same problem, I've coded a small executable program that shall remove the assmebly from the GAC using GAC API and without the need to have gacutil.

It is attached to this thread in a rar file.
Usage: GacRemover.exe [AssemblyName]

The program prints to OutputDebugString so you can use DebugView (Sysinternals/Microsoft) to view the outcome.
The program returns 0 if success and 1 if fails.

Compiled using .NET 3.5

Regards,
T.
Attachments
GacRemover.rar
GacRemover - Uninstall Assembly from GAC
(3.1 KiB) Downloaded 396 times
Last edited by tzachk on Tue Nov 13, 2012 8:47 am, edited 1 time in total.

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Remove Unpinned Assemblies

Postby FrancescoT » Tue Nov 13, 2012 8:38 am

Dear Tzach,

Many many thanks for your post.

By the way, I will investigate further with "Remove Unpinned Assemblies" command.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

pjahans
Posts: 5
Joined: Thu May 03, 2012 1:29 pm

Re: Remove Unpinned Assemblies

Postby pjahans » Tue Dec 23, 2014 2:42 pm

Hello Francesco, I am using IA version 12 and have been having the same trouble unpinning GAC assemblies. After almost a couple of days trying various solutions from this forum I discovered that it all works just fine when you set NATIVE mode to FALSE.

Adding Assemblies from the IA user-interface and checking the box called "Register Assembly" for each one, IA created the appropriate scripting and unpinned successfully when uninstalling. This only worked when NATIVE mode was FALSE.

This is the registry key that is written when running the my installer with NATIVE mode set to TRUE under Windows 7 64-bit machine:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Fusion\References\oes.cfm, Version=2.2.20.1, Culture=neutral, PublicKeyToken=4e0eee926b49b8eb, processorArchitecture=x86\{2EC93463-B0C3-45E1-8364-327E96AEA856}]
"{C7CBF8BC-6178-4A48-B506-0B95C54FAADE}"="InstallAware"

When I uninstall my application, this registry key is not removed. So the GAC assembly "oes.cfm" remains pinned.

Maybe this is all old news now; I haven't read the entire forum for other solutions. Anyway, it works for me now. :D


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 32 guests