cancel
Showing results for 
Search instead for 
Did you mean: 

PC Drivers & Software

tqtr
Adept I

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

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"

12 Replies
vasek9999
Journeyman III

I also had this problem after reinstall of W10, Nothing helped, Uninstall drivers, install, AMD clear utility, Chipsets drivers from AMD vs ASUS (Motherboard), regedit. I did the installation of W10 again but without any Win10 upgrades. I started installing RyzenMaster and everything went without problems. During the RyzenM installation, the MVisual C ++ library is checked for possible installation. I believe that the reluctance to continue to install Ryzen Master with a newer version is due to a faulty scan of MV C ++. So it's not about the presence of a newer version of Ryzen Master, but of the Visual C ++ library. Removing newer Visual C ++ will allow a successful installation of RyzenM. After that, the libraries can be reinstalled. Sorry for my bad English

tqtr
Adept I

Yeah, that embedded VBS script is badly written and it can cause unexpected results. It can identify any installed program as RM in certain conditions. The issue starts with these two lines:

Dim SysemComponent : SysemComponent = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\SystemComponent")
     Dim InstalledAppVer : InstalledAppVer = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\DisplayVersion")

As I said, I don't have any experience in writting VBS scripts, but these two lines appear to have unexpected results if WshShell.RegRead fails. If they would have moved the variable declaration outside of the for loop, and reinitialized those two variables at the beginning of each for iteration, then it wouldn't have produced unexpected results. And it looks like this is exactly what the script's author did for InstalledAppName = WshShell.RegRead, probably after failing in his testing initially.

Hopefully this will reach the team in charge of the installer so they would fix it in the future! @mods

You all have great information here. Nobody from the driver team at AMD will likely see your thread here. These are USER TO USER forums only and the couple of mods here respond to only a very small fraction of threads. 

I highly suggest you all send your findings to AMD Support. That is about the only chance you have of it being passed on to engineering. Here is the link: https://www.amd.com/en/support/contact

absolutxtr
Newcomer

*sigh* could it be as simple as whatever is compiling the code is super sensitive on cAsE? i.e.

"If InStr(InstalledAppName, "AMD Ryzen Master") > 0  AND InStr(InstalledAppName, "SDK") = 0 AND (SysemComponent = 1) then"

then should be...Then

If the script is just evaluating the following line on some random registry entry... then that might explain why it fails randomly and some people have success installing one thing, while others another....

 "If (InstalledAppVer) > (PrdVer)"

I don't know much about VB either but proper syntax seems to be "Then" not "then."

tqtr‌ - is there a way to edit this script (or use yours) and still use the installer or is this a puzzle left to us to figure out, randomly uninstalling programs / changing versions in the registry?

0 Likes

VBS is case insensitive, so doesn't matter how you write "then".

You can use the script I attached in my first post to see which program is "the newer version". My script is the orignal script, I just added two  "prints" to see where the problem is and a call for that function in that script.

  • download and unpack in a new folder the zip from the first post
  • copy in the same folder the 64bit version of wscript.exe from c:\Windows\WinSxS\amd64_microsoft-windows-scripting_31bf3856ad364e35_10.0.18362.1_none_1ac5c3117d92605b\wscript.exe , and rename it to wscript64.exe. The folder name "amd64_microsoft-windows-scripting_31bf3856ad364e35_10.0.18362.1_none_1ac5c3117d92605b"might be different on your system, but you should have a similiar folder name starting with amd64_ with wscript.exe in it, just use search.
  • I don't think this is necessary, but you can also try to run it with the 32bit version of wscript.exe that you can find in c:\windows\syswow64\wscript.exe. If you run it with the 32bit version, the reg query will look in the registry node dedicated for the 32bit applications(see my first post for registry path differences)
  • make sure this file exists:  C:\AMD\RyzenMasterExtract\MSIFiles\Packages\AMD Ryzen Master UI.exe. If you tried running the RyzenMaster installer and the install failed, the file should be there. If the file is not there just start the installer again, and don't close it while you execute the script.
  • and finally, open a command prompt window in the folder with the script and start it with "wscript64.exe whyUnotInstall.vbs". If "nothing found" pops up, then this is not the same issue in your case. If the script pops a program name, you can uninstall that program( or edit the program's DisplayVersion in the registry), then try running the script again. If you get another program name, you repeat the previous steps until you get "nothing found". Now you should be able to start the installer again.
0 Likes

Thanks man. I did try an online compiler and I did see that it didn't care about "Then" vs. "then". But I can't figure out what else it could be, looking at the code. Perhaps this is some sort of edge case that makes the "then" case sensitive? I'm almost certain that the behaviour is that the script is completely ignoring this line: If InStr(InstalledAppName, "AMD Ryzen Master") > 0  AND InStr(InstalledAppName, "SDK") = 0 AND (SysemComponent = 1)

... and just iterating through every program I have installed using this:

If (InstalledAppVer) > (PrdVer) Then
          PrdctInstalled = "DOWNGRADE"
          Exit Function
        End If

0 Likes

Thank you..This solution worked wonderfully. I found 4 programs which had version above 2 which has nothing to do with amd. Can not believe AMD people have released a crappy work like this which is going on for so long even for the latest version..

0 Likes

@tqtr 

Thanks so much for your script! I had almost given up after trying a couple of other solutions that didn't work for me.

Using your script I was able to narrow the problem down to three applications and modify their DisplayVersion so that the install worked!

Awesome!

0 Likes
absolutxtr
Newcomer

I LITERALLY had to change "DisplayVersion" in EVERY SINGLE ENTRY in \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ (where the subkey existed) to get it to install. I swear it has to be that stupid "then". 

If anything you have installed on your system is versioned higher than "2.1..." it just won't go. Didn't matter if it was C++... or whether it was a system component or not.

WORST.

Best part is, it thinks it's upgrading. I hope it didn't randomly uninstall something on me.

So, solution is: 

Have absolutely nothing else installed that hits that folder above with a subkey value > 2.1 for "DisplayVersion". Or... go through the pain of changing each and every one to something smaller than 2.1.

0 Likes

That was a bit extreme editing all those registry values, sorry my previous reply a was a bit late. Not all of the DisplayVersion entries larger than 2.1 had to be edited.

Don't worry about the installer randomly uninstalling something else, i don't think that's the case.

0 Likes

I found that I literally had to change everything that had a "DisplayVersion" key. I mean, I didn't retry after each edit, or in every order, but I initially tried editing only those entries that had "System Component = 1". Changing all of those didn't do the trick. So I went and did ALL of them... still didn't work. Went back, found 1 more that I'd missed (and it wasn't a "System Component = 1" program). Finally it worked.

I may do a clean install of windows soon and will try installing Ryzen Master on a clean install - I bet it works fine.

0 Likes
meshein
Journeyman III

@tqtr I almost never leave responses to threads, even if they helped me.  Just wanted to shout out that this was an amazing solution to a problem others did not seem to be able to solve.  Everyone else suggested a brute force plan of attack lowering the DisplayVersion for all entries in HKEY...\Uninstall.  This would have taken hours.  Your quick vb tool identified 2 different entries that needed to be downgraded below 2.1.  And that's it - Mater 2.1.1 installed without a problem.  You took a 2 hour tedious task and made it 2 minutes.  Thanks for making the world a better place; cheers .

0 Likes