I found the offending key in the registry, but I can't figure out what it doesn't like about it. The error is specifically coming from the command:
Get-ItemProperty -LiteralPath $_.PsPath
Found on line 1053 in "AppDeployToolkitMain.ps1" as part of a larger command. This command works fine except for these two PSPaths:
Trying to execute the command manually gives me the same error
Get-ItemProperty -LiteralPath 'Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\nbi-glassfish-mod-188.8.131.52.0'
Get-ItemProperty : Specified cast is not valid.
At line:1 char:1
+ Get-ItemProperty -LiteralPath "Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_M ...
+ CategoryInfo : NotSpecified: (:) [Get-ItemProperty], InvalidCastException
+ FullyQualifiedErrorId : System.InvalidCastException,Microsoft.PowerShell.Commands.GetItemPropertyCommand
So these two applications are nothing special, GlassFish Server and NetBeans IDE, but why does this command have such and issue with these Registry Key names? I know removing the programs and deleting the keys would probably get things working as far as the
toolkit is concerned but I would rather find out why it is having a problem instead of just working around it. Anyone have any ideas?