Page 1 of 1

Remove Unpinned Assemblies

Posted: Wed Nov 07, 2012 4:06 am
by tzachk
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.

Re: Remove Unpinned Assemblies

Posted: Wed Nov 07, 2012 5:55 am
by FrancescoT
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

Re: Remove Unpinned Assemblies

Posted: Wed Nov 07, 2012 5:59 am
by tzachk
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.

Re: Remove Unpinned Assemblies

Posted: Thu Nov 08, 2012 9:29 am
by FrancescoT
Dear Tzachk,

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

Regards

Re: Remove Unpinned Assemblies

Posted: Sun Nov 11, 2012 2:56 am
by tzachk
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.

Re: Remove Unpinned Assemblies

Posted: Mon Nov 12, 2012 8:32 am
by FrancescoT
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

Re: Remove Unpinned Assemblies

Posted: Tue Nov 13, 2012 3:21 am
by tzachk
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

Re: Remove Unpinned Assemblies

Posted: Tue Nov 13, 2012 7:59 am
by tzachk
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.

Re: Remove Unpinned Assemblies

Posted: Tue Nov 13, 2012 8:38 am
by FrancescoT
Dear Tzach,

Many many thanks for your post.

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

Regards

Re: Remove Unpinned Assemblies

Posted: Tue Dec 23, 2014 2:42 pm
by pjahans
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