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

    TeamViewer QuickSupport removal

    Scheduled Pinned Locked Moved [Corporate] Deployment -> Custom Software
    1 Posts 1 Posters 48 Views
    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.
    • rnzR Offline
      rnz
      last edited by Tom

      TeamViewer QuickSupport is a portable app that cannot be supported for patching.

      As portable applications do not install, there is no automatic process to delete them, unlike traditional applications that have registry information and provide a silent uninstallString, therefore, portable applications can only be deleted and not uninstalled.

      This script removes TeamViewer QuickSupport.
      It should be noted that deleting files in the SYSTEM context recursively into areas controlled by users is considered bad practice, we have tried to compensate for this by checking if the file is a symbolic link, before removing it.

      # Define the paths to search and the file names to delete
      $rootPath = "C:\"
      $filesToDelete = @("TeamViewerQS.exe", "TeamViewerQS_x64.exe")
      
      # Function to safely delete files without following symlinks
      function Remove-File {
          param (
              [string]$Path,
              [string[]]$Files
          )
          
          # Get all directories and files in the specified path
          $items = Get-ChildItem -Path $Path -Recurse -Force -ErrorAction SilentlyContinue
          
          foreach ($item in $items) {
              # Skip if the item is a symlink
              if ($item.Attributes -band [System.IO.FileAttributes]::ReparsePoint) {
                  Write-Output "Skipping symlink: $($item.FullName)"
                  continue
              }
              
              # Check if the item is one of the files to delete
              if ($Files -contains $item.Name) {
                  try {
                      Remove-Item -Path $item.FullName -Force -ErrorAction Stop
                      Write-Output "Deleted: $($item.FullName)"
                  } catch {
                      Write-Error "Failed to delete: $($item.FullName) - $_"
                  }
              }
          }
      }
      
      # Call the function to remove the files 
      Remove-File -Path $rootPath -Files $filesToDelete
      

      Custom Software Configuration:
      f38d2a2b-ee69-45d4-b2fe-5b8ead22d640-image.png

      1 Reply Last reply Reply Quote 0
      • T Tom moved this topic from [Custom Software guide drafts] on
      • 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