🤘 0 reputation

DanJ_LRSFC

Standard

Joined: 6/24/2015

Last seen: 8/15/2018

Activity
  • I would also like to see this. I have to abort the running deployments and reboot the machine with PDQ installed before I can successfully deploy something I need deployed straight away.

  • Does the one in the package library fix the default Windows zip association as well? As the 7-zip uninstaller doesn't seem to restore this.

  • Doh! I didn't think to look in the package library...

  • So this is the script I went with in the end:

     

    If ((Test-Path 'C:\Program Files\7-zip\uninstall.exe') -or (Test-Path 'C:\Program Files (x86)\7-zip\uninstall.exe')){

    Write-Output "Uninstall.exe found......using"

    if (Test-Path 'C:\Program Files\7-zip\uninstall.exe') {
    Start-Process -FilePath 'C:\program files\7-zip\uninstall.exe' -ArgumentList '/S', '/V', '/qn' , '/norestart'
    }
    if (Test-Path 'C:\Program Files (x86)\7-zip\uninstall.exe') {
    Start-Process -FilePath 'C:\program files (x86)\7-zip\uninstall.exe' -ArgumentList '/S', '/V', '/qn' , '/norestart'
    }
    }

    Else{

    Write-Output "Uninstall.exe not present, using WMI method Uninstall()"

    $version = Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -match "7-zip"}

    $version.Uninstall()

    }

  • I got a warning in PDQ Deploy saying I should use Write-Output instead of Write-Host so I changed that as well.

  • We're using the 64-bit versions, so I've changed the script from Program Files (x86) to just Program Files. I'll try it now.

  • "You cannot call a method on a null-valued expression." it says. So I guess it's somehow not finding the 7-zip uninstall entry? I definitely installed it on the test PC, I downloaded it specifically on there for the purpose.

  • That script failed with the 1234 error code that you put in there. Any suggestions on how to troubleshoot it?

  • Thanks, I'll try that once I'm finished dealing with the calls I have on at the moment.

  • We should be as we have an Enterprise subscription. I'll check now and if we aren't I'll update.

     

    Thanks.

  • Thanks, that would be really helpful!

  • Uninstalling 7-zip?