1

Closed

3.6.1 Remove-MsiApplication issue?

description

Hi guys,

Don't know if this an issue with 3.6.1 toolkit itself, but I didn't get such error in 3.5.0. Maybe new functionality for 3.6.1?
[Pre-Installation] :: Error Record:
-------------

Message        : Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'Path' 
                  Key being added: 'Path'"
InnerException : System.ArgumentException: Item has already been added. Key in dictionary: 'Path'  Key being added: 'Pa
                 th'
                    at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
                    at CallSite.Target(Closure , CallSite , Object , String , Object )

FullyQualifiedErrorId : ArgumentException
ScriptStackTrace      : at Remove-MSIApplications<Process>, C:\Users\username\Documents\Desktop\Temp Toolkit Apps\W
                        ebex Clients\AppDeployToolkit\AppDeployToolkitMain.ps1: line 2156
                        at <ScriptBlock>, C:\Users\username\Documents\Desktop\Temp Toolkit Apps\Webex Clients\Deplo
                        y-Application.ps1: line 115
                        at <ScriptBlock>, <No file>: line 1
                        at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\Users\username\Documents\Desktop\Temp Toolkit Apps\Webex Clients\AppDeployToolkit\AppDeploy
                  ToolkitMain.ps1:2156 char:6
                  +                     $ExecuteMSISplat.Add( 'Path', $installedApplication.ProductCode)
                  +                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Error Inner Exception(s):
-------------------------

Message        : Item has already been added. Key in dictionary: 'Path'  Key being added: 'Path'
InnerException : 
I also attach log and script for your reference.

Thank you.

file attachments

Closed Apr 14, 2015 at 12:00 PM by mmashwani

comments

mmashwani wrote Apr 11, 2015 at 6:29 PM

Change line:
[hashtable]$ExecuteMSISplat =  @{ Action = 'Uninstall' }
To:
[hashtable]$ExecuteMSISplat =  @{ Action = 'Uninstall'; Path = '' }
Change line:
$ExecuteMSISplat.Add( 'Path', $installedApplication.ProductCode)
To:
$ExecuteMSISplat.Path = $installedApplication.ProductCode

mmashwani wrote Apr 11, 2015 at 6:36 PM

** Closed by mmashwani 04/11/2015 11:36AM

sthar13 wrote Apr 11, 2015 at 7:22 PM

Thanks for answering.

Should i apply this change to all my 3.6.1 scripts or only where needed?

mmashwani wrote Apr 11, 2015 at 7:25 PM

You can apply this to your main version of the 3.6.1 toolkit. It will be included as a permanent fix in the next release of the toolkit.

mmashwani wrote Apr 14, 2015 at 12:00 PM

We have moved to a new homepage! You can now find us as http://psappdeploytoolkit.com.

This issue has been fixed in the latest 3.6.2 produciton release on our new repository on GitHub.
https://github.com/PSAppDeployToolkit/PSAppDeployToolkit/releases