Uninstall 7-Zip 19.00 (x64 edition) - 64 bit

Uninstall 7-Zip 19.00 (x64 edition) - 64 bit

Was it installed with MSI or setup.exe

1 Like

Relevance:

  • windows of operating system
    
  • x64 of operating system
    
  • exists keys whose(value "DisplayName" of it as string starts with "7-Zip" and (value "DisplayVersion" of it as string | "0.0") as version <= "19.00") of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of x64 registries
    

Actionscript:

// Remove the 64-bit version (using registered uninstall string)
if {exists value "QuietUninstallString" whose (it != "") of keys whose (value "DisplayName" of it as string starts with "7-Zip" and (value "DisplayVersion" of it as string | "0.0") as version <= "19.00") of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of x64 registries}
    waithidden {exists value "QuietUninstallString" whose (it != "") of keys whose (value "DisplayName" of it as string starts with "7-Zip" and (value "DisplayVersion" of it as string | "0.0") as version <= "19.00") of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of x64 registries}
endif

// Remove the 64-bit version at the default location (if present)
if {exists file "C:\Program Files\7-Zip\Uninstall.exe"}
    waithidden "C:\Program Files\7-Zip\Uninstall.exe" /S
endif
1 Like

Want to uninstall 7 zip 24 /25 but problem is 26 also installed, 24,25 with installed both msi and non msi …kindly provide action script with relevance for x64 os win 1125H2

Sounds like you have a special problem there that isn’t normal.

You’ll have to build something yourself to accomplish this.

I encountered a similar issue years ago, where both the MSI and EXE versions were installed on some devices. To maintain a consistent version across all devices, I used this uninstaller. You can give it a try and modify it as needed.

````// Remove the 64-bit EXE version
if {exists key whose (value "DisplayName" of it as string as lowercase contains "7-zip" AND value "DisplayVersion" of it as string as version < "19.0" AND value "UninstallString" of it as string as lowercase contains "uninstall") of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (x64 registry)}
waithidden {value "UninstallString" of key whose (value "DisplayName" of it as string as lowercase contains "7-zip" AND value "DisplayVersion" of it as string as version < "19.0" AND value "UninstallString" of it as string as lowercase contains "uninstall") of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (x64 registry)} /S
endif

// Remove old 64-bit MSI versions
if {exists key whose (value "DisplayName" of it as string as lowercase contains "7-zip" AND value "DisplayVersion" of it as string as version < "19.0" AND name of it starts with "{") of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (x64 registry)}
waithidden cmd.exe /C wmic product where "name like '%7-Zip%'" call uninstall /nointeractive
delete __createfile
delete uninstall.bat
createfile until end
{ concatenations "%0d%0a" of ((pathname of system folder & "\msiexec.exe /X ") & (preceding text of last "}}" of it) & "}} /quiet /norestart") of names of keys whose (value "DisplayName" of it as string as lowercase contains "7-zip" AND value "DisplayVersion" of it as string as version < "19.0" AND name of it starts with "{") of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (x64 registry) }
end
move __createfile uninstall.bat
waithidden uninstall.bat
endif

// Remove the 32-bit EXE version
if {exists key whose (value "DisplayName" of it as string as lowercase contains "7-zip" AND value "DisplayVersion" of it as string as version < "19.0" AND value "UninstallString" of it as string as lowercase contains "uninstall") of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (x32 registry)}
waithidden {value "UninstallString" of key whose (value "DisplayName" of it as string as lowercase contains "7-zip" AND value "DisplayVersion" of it as string as version < "19.0" AND value "UninstallString" of it as string as lowercase contains "uninstall") of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (x32 registry)} /S
endif

// Remove old 32-bit MSI versions
if {exists key whose (value "DisplayName" of it as string as lowercase contains "7-zip" AND value "DisplayVersion" of it as string as version < "19.0" AND name of it starts with "{") of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (x32 registry)}
waithidden cmd.exe /C wmic product where "name like '%7-Zip%'" call uninstall /nointeractive
delete __createfile
delete uninstall.bat
createfile until end
{ concatenations "%0d%0a" of ((pathname of system folder & "\msiexec.exe /X ") & (preceding text of last "}}" of it) & "}} /quiet /norestart") of names of keys whose (value "DisplayName" of it as string as lowercase contains "7-zip" AND value "DisplayVersion" of it as string as version < "19.0" AND name of it starts with "{") of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (x32 registry) }
end
move __createfile uninstall.bat
waithidden uninstall.bat
endif````

2 Likes