Scoop: Refactor uninstallation

Created on 5 Jan 2019  ยท  1Comment  ยท  Source: lukesampson/scoop

_Implemented in shovel 0.5_

  • Part of #488
  1. [ ] Remove similar uninstallation code
  2. [ ] Implement uninstallation of running applications

    • function Scoop-GetProcess($appname, $global) into core/install/uninstall

      • Return whole Get-Process

      <#
      .SYNOPSIS
          Get all running processes for given app.
      .PARAMETER AppName
          Name of the application.
          Default to return all running applications. (Mainly for uninstallatino of whole scoop)
      .PARAMETER Global
          Get process for globally installed applications.
      #>
      function Scoop-GetProcess {
          param(
              [String] $AppName = '*',
              [Switch] $Global
          )
      
          $procs = Get-Process # Avoid calling twice for each path
          if ($Global) {
              return $procs | Where-Object { $_.Path -like "$globaldir\apps\$AppName\*" }
          } else {
              return $procs | Where-Object { $_.Path -like "$scoopdir\apps\$AppName\*" }
          }
      }

    • Adopt libexecs for Get-Process


      • Uninstall

      • Update

  3. [ ] โ“ Add force parameter to uninstall for killing running applications

Most helpful comment

Not sure if this is the right place for this, but would it be possible to add an option to run the uninstaller script regardless of whether the application is still running? Corsair iCUE's uninstaller automatically kills all of its processes before uninstalling, but it's unnecessarily difficult to have to kill all Corsair iCUE processes before uninstalling, as they also include services.

>All comments

Not sure if this is the right place for this, but would it be possible to add an option to run the uninstaller script regardless of whether the application is still running? Corsair iCUE's uninstaller automatically kills all of its processes before uninstalling, but it's unnecessarily difficult to have to kill all Corsair iCUE processes before uninstalling, as they also include services.

Was this page helpful?
0 / 5 - 0 ratings