AnsweredAssumed Answered

Ryzen Master 2.1.1.1472 "A newer version of this application is already installed on this computer" issue fix

Question asked by tqtr on Feb 12, 2020
Latest reply on Mar 2, 2020 by absolutxtr

Hi,

 

No idea how this installer passed the QA team and got released to the public in this form, but it says a lot about the AMD's QA, considering this seems to be an old issue. I just spent the last 3hours trying to get this app to install, because the installer wrongly identified another application installed on my PC as Ryzen Master because of a badly written vbs script embedded in setup.exe that is used to check if RM is installed on the system by checking the registry entries from "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall". In my case, it was flagging Total Commander 9.xx as RM, but after changing the version from 9.xx to 1.xx, RyzenMaster installed without issue.

 

Here's the script as extracted from setup.exe(it gets unpacked in c:\AMD\RyzenMasterExtract\MSIFiles\Qt_Dependancies after running the downloaded installer):

'************************************************************************************
'Function to check if Ryzen Master is already deployed on the system for downgrade
'************************************************************************************
Function PrdctInstalled()
  On Error Resume Next
  const HKEY_LOCAL_MACHINE = &H80000002
  Set WshShell = CreateObject("WScript.Shell")
  Set objFSO = CreateObject("Scripting.FileSystemObject")
  Dim PrdFile : PrdFile = "C:\AMD\RyzenMasterExtract\MSIFiles\Packages\AMD Ryzen Master UI.exe"
  If objFSO.FileExists(PrdFile) Then
    Dim PrdVer : PrdVer = objFSO.GetFileVersion(PrdFile)
    strComputer = "."
    Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"& strComputer & "\root\default:StdRegProv")
    strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
    objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
    For Each subkey In arrSubKeys
      InstalledAppName = ""
      InstalledAppName = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName")
      Dim SysemComponent : SysemComponent = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\SystemComponent")
      Dim InstalledAppVer : InstalledAppVer = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\DisplayVersion")
      If InStr(InstalledAppName, "AMD Ryzen Master") > 0  AND InStr(InstalledAppName, "SDK") = 0 AND (SysemComponent = 1) then
        If (InstalledAppVer) > (PrdVer) Then
          PrdctInstalled = "DOWNGRADE"
          Exit Function
        End If
      End If
    Next
  Else
    PrdctInstalled = "NOFILE"
  End If
  Set objReg = Nothing
  Set WshShell = Nothing
  Set objFSO = Nothing
End Function

The issue is caused by this check (SysemComponent = 1).    I don't have any experience in writing vb scripts but in my case it seems to compare an empty string with 1 and for some reason it makes that if clause to evaluate to True.

 

I attached a slightly modified version of the script. It will just show a message box with the found program name causing the issue, and it will show "not found!" if this is not the issue. It works for version 2.1.1.1472, but you have to run the downloaded installer at least one time so it creates the file "C:\AMD\RyzenMasterExtract\MSIFiles\Packages\AMD Ryzen Master UI.exe". It uses the version of this file to check the registry for older versions. The script must be run with a 64bit version of wscript.exe. The 32bit version of wscript.exe will check the regsitry entries from Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall instead of "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"

Attachments

Outcomes