cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Bineesh
Level 6

Managed custom action aborting uninstallation

Hi,
In my Basic MSI Project I am uinsg a managed code custom action while installation and uninstallation. But if I do uninstallation as an admin user (other than Administrator) it it aborting uninstallation. If I do uninstallatin as 'Administrator' user it is working perfect. I am locally caching the MSI. If I use same setup file and Select 'Remove' it is working. It is aboting uninstallation while doing from add/remove programs. It is happening in Windows 7 Operating system.

Log:

MSI (s) (10:D4) [13:17:12:704]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI95D5.tmp, Entrypoint: m1
Action start 13:17:12: StopFireService.
InstallShield: Loaded CLR successfully
InstallShield: Exception: System.ArgumentException: Item has already been added. Key in dictionary: 'is_sqlserver_password' Key being added: 'is_sqlserver_password'
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at System.Collections.Specialized.StringDictionary.Add(String key, String value)
at InstallShield.ClrHelper.CustomActionHelper.Initialize(UInt32 installHandle, IntPtr instanceHandle)
at InstallShield.ClrHelper.CustomActionHelper.RunAction(UInt32 installHandle, Int32 entryNumber, Int64 instanceHandle)
InstallShield: Managed code threw an unhandled exception.
CustomAction StopFireService returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 13:17:12: StopFireService. Return value 3.
Action ended 13:17:12: INSTALL. Return value 3.


Any Idea....
Labels (1)
0 Kudos
(7) Replies
Vijay__K
Level 7

Is your action set to deferred in system context?
It might need to be set like this if ur action is editing the secure system.
0 Kudos
Bineesh
Level 6

Thanks for your reply..
No it is an Immediate cutom action calling After MigrateFeatureState. It is executing only once in a process. It is working perfect if the user is Administrator in Windows 7 it is failing if the any other user even if having Admin rights.
0 Kudos
Vijay__K
Level 7

It's immediate, thats why it fails, because for any user other than the builtin admin user.
You need to make it deferred in sys context.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

It looks like this could be caused by a deficiency in our wrapper. In particular, if the property MsiHiddenProperties contains multiple copies of the same property, it will try to insert it in a StringDictionary twice. This will then raise the exception being seen. You will not see this in a deferred action unless you pass MsiHiddenProperties via CustomActionData. You can fix this by removing the duplicate instance of is_sqlserver_password from MsiHiddenProperties.

I've reported this on WO# IOA-000057430 so we can fix this in a future release.
0 Kudos
Mrunmayee
Level 5

Hi MichaelU,
Can you please give more details on fixing this issue? I mean some steps to fix the error.

Regrads,
Mrunmayee
0 Kudos
Alpesh
Flexera Alumni

Check if you have multiple Sql Connections. If you have, then make sure that the properties for the Sql Connections on the Advanced tab are different across the Sql Connections. Especially the password property should be different.

I hope this helps!
0 Kudos
Mrunmayee
Level 5

Thank you Alpesh.
I followed the steps you mentioned and that resolved my issue.
0 Kudos