Showing results for 
Search instead for 
Did you mean: 

Uninstaller does not work as expected STM32CubeProgrammer V2.16 (64-bit) on Windows 10


During the installation of the STM32CubeProgrammer creates some registry keys under:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\STM32CubeProgrammer 2.16.0\

One of them is "UninstallString" with the value:

cmd /c start /min cmd /c "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\Uninstaller\unscript.bat" & "C:\Users\elkadmin\AppData\Local\Temp\7zS852D4102\jre\bin\javaw.exe" -jar "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\Uninstaller\uninstaller.jar" -f -x

If I run this command on in a cmd.exe with the same elevated credentials as the installer was started I get the initial uninstall screen as expected


After clicking on the "Uninstall" button I get the unhandled exception message:


Here is a text version:

exception caught
com.izforge.izpack.api.exception.WrappedNativeLibException: NativeLibException.functionFailed.RegOpenKeyEx
NativeLibException.libInternal.OsErrNumPraefix5 NativeLibException.libInternal.OsErrStringPraefixAccess is denied, at
com. izforge. izpack. event. Registr yUninstallerListener. beforeDelete (Registr yUninstallerListener .java : 136) at
com.izforge.izpack.uninstaller.event.UninstallerListeners.beforeDeletion( 110) at
com. izforge. izpack. uninstaller. Destroyer, destroy (Destroyer .java: 192) at (Destroyer .java: 155) at
java. lang.Thread, run (Thread .java: 750) Caused by: com.izforge.izpack.api.exception.NativeLibException: Cannot open registry key
HKEY_LOCAL_MACHINE\SOFTWAREV4icrosoft\Windows\CurrentVersion\App Paths\STM32CubeProgrammer.exe. System error number is: 5
System error text is: Access is denied, at Method) at
com. coi. tools. os. win. Registr ylmpl. rewind (Registr ylmpl .java : 548) at
com.izforge.izpack.util.os.Win_RegistryHandler.rewind( at
com. izforge. izpack. event. Registr yUninstallerListener. beforeDelete (Registr yUninstallerListener. java: 132)... 4 more

I do not start anything that could cause the "Access is denied" situation in the registry.

I beleieve this behavior is related to 

Interestingly, the uninstallation works without any problems if it is executed from the Windows Add/Remove Programs dialog.
Unfortunately, this does not help because the uninstallation is to be called by a dependent uninstaller.