SecTeer VulnDetect & PatchPro Support Forum VulnDetect
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Download VulnDetect Installer
    • Login

    Uninstall SecTeer VulnDetect Agent

    Scheduled Pinned Locked Moved [Corporate] Deployment -> Custom Software
    1 Posts 1 Posters 1.2k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      Tom VulnDetect Team Member
      last edited by Tom

      Can I uninstall the Agent using the Agent and Custom Software?

      Yes, that is doable, although you won't be able to see the correct state in the Job Activity, because the system won't be able to report back to the backend.

      Here is a PowerShell script that does that:

      $SecTeer = "SecTeer VulnDetect"
      $PF = if ([Environment]::Is64BitOperatingSystem) { ${env:ProgramFiles(x86)} } else { $env:ProgramFiles }
      $SecTeerPath = Join-Path $PF $SecTeer
      
      $unins = @("unins000.exe","unins001.exe") | ForEach-Object { Join-Path $SecTeerPath $_ } | Where-Object { Test-Path $_ } | Select-Object -First 1
      $ok = $true
      
      if($unins){
        $p = Start-Process -FilePath $unins -ArgumentList "/VERYSILENT /SUPPRESSMSGBOXES /FORCECLOSEAPPLICATIONS /NOCANCEL" -Wait -PassThru -WindowStyle Hidden -ErrorAction SilentlyContinue
        if(!$p -or $p.ExitCode -ne 0){ $ok = $false; Write-Warning "Uninstaller exit code: $($p.ExitCode)" }
      }else{
        $app = Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall","HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" -ErrorAction SilentlyContinue |
               Get-ItemProperty -ErrorAction SilentlyContinue | Where-Object DisplayName -Like "$SecTeer*"
        foreach($a in $app){
          if($a.UninstallString -match 'MsiExec\.exe.*?({[\w-]+})'){ Start-Process msiexec.exe "/x $($matches[1]) /qn /norestart" -Wait -ErrorAction SilentlyContinue }
          elseif($a.UninstallString){ Start-Process cmd.exe "/c $($a.UninstallString) /qn /norestart" -Wait -ErrorAction SilentlyContinue }
        }
      }
      
      Get-ScheduledTask -ErrorAction SilentlyContinue | Where-Object { $_.TaskName -like "SecTeer VulnDetect*" -or $_.TaskName -like "SecTeerVulnDetect*" } |
        ForEach-Object { Unregister-ScheduledTask -TaskName $_.TaskName -TaskPath $_.TaskPath -Confirm:$false -ErrorAction SilentlyContinue }
      
      Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall","HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" -ErrorAction SilentlyContinue |
        Where-Object { (Get-ItemProperty $_.PSPath -ErrorAction SilentlyContinue).DisplayName -like "$SecTeer*" } |
        Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
      
      Remove-Item (Join-Path $env:ProgramData $SecTeer) -Recurse -Force -ErrorAction SilentlyContinue
      
      if($ok){ Write-Output "$SecTeer removed."; exit 0 } else { Write-Warning "$SecTeer uninstall may have failed."; exit 1 }
      

      /Tom
      Download the latest SecTeer VulnDetect agent here:
      https://vulndetect.com/dl/secteerSetup.exe

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Download SecTeer Personal VulnDetect - an alternative to the long lost Secunia PSI

      Please see our Privacy and Data Processing Policy
      Sponsored and operated by SecTeer | VulnDetect is a replacement for the EoL Secunia PSI
      Forum software by NodeBB