Lovely. Having a bug reported to you in 2015, and acknowledged, that makes software crash and not fixing it.
For NetBeans (still one of the major IDEs) and related stuff like GlassFish, this is too true (a workaround is in the Solution steps
) below: [WayBack] Bug 251538 – Your Installer is Creating Invalid Data for the NoModify DWORD Key which crashes enumeration of the Uninstall Key in at least PowerShell, and copied to [WayBack] [NETBEANS-2523] Netbeans 64-bit creates invalid nomodify value in windows registry for years – ASF JIRA.
This one appears for instance when running choco install --yes jre8
(but is certainly not limited to it) as it inspects uninstall registry values which have been corrupted and resulted into [WayBack] “Specified cast is not valid” on jre8 upgrade · Issue #18 · proudcanadianeh/ChocoPackages · GitHub.
Anyway: back to the NoModify
issue:
I encountered it in 2019, when switching my JRE installations to become chocolatey based.
Solution steps
- Run the script mentioned in [WayBack] powershell – How to resolve “ERROR: Specified cast is not valid.” error during installation? – Super User:
Run the below:
Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | % { write-host "Key Name:" $_.PSChildName }
This should return some results, then, will return the Specified cast
error. The error will occur on the key harboring the invalid subkey.
- Then inspect the keys after that in regedit, and watch for any value of type
REG_DWORD
with a value (invalid DWORD (32-bit) value)
(usually named NoModify
- Note those keys, and find them in
appwiz.cpl
- Uninstall the accompanying software
On my systems
Delete the below pieces of crap.
Then run choco install --yes jre8
again.
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\nbi-glassfish-mod-3.1.43.0.0


Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\nbi-nb-base-7.0.0.0.0


Luckily, the NetBeans uninstaller can uninstall GlassFish at the same time:

Do not re-install, as they re-insert the corrupt data.
–jeroen
Like this:
Like Loading...