From 1b7dab5fb2c7c3995b0d7438e1a99e9e8ddb852d Mon Sep 17 00:00:00 2001 From: polo Date: Thu, 19 Nov 2026 19:54:55 +0100 Subject: =?UTF-8?q?scripts=20de=20d=C3=A9sinstallation=20pour=20linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/rustdesk-uninstall.bat.php | 115 ------------------------------------- 1 file changed, 115 deletions(-) delete mode 100755 scripts/rustdesk-uninstall.bat.php (limited to 'scripts/rustdesk-uninstall.bat.php') diff --git a/scripts/rustdesk-uninstall.bat.php b/scripts/rustdesk-uninstall.bat.php deleted file mode 100755 index 89e1584..0000000 --- a/scripts/rustdesk-uninstall.bat.php +++ /dev/null @@ -1,115 +0,0 @@ -@echo off -setlocal -title Desinstallation de RustDesk - -:: Verifier les droits administrateur et demander l'elevation si necessaire -net session >nul 2>&1 -if %errorlevel% neq 0 ( - echo Demande des droits administrateur... - powershell.exe -NoProfile -Command "Start-Process -FilePath '%~f0' -Verb RunAs" - exit /b -) - -cls -echo ========================================== -echo DESINSTALLATION DE RUSTDESK -echo ========================================== -echo. -echo Nettoyage en cours... -echo Veuillez patienter. -echo. - -:: Executer le nettoyage avec PowerShell -powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "$ErrorActionPreference='SilentlyContinue'; Write-Host '[1/5] Fermeture de RustDesk...'; Get-Process -Name 'rustdesk' | Stop-Process -Force; Start-Sleep -Seconds 2; Write-Host '[2/5] Arret du service...'; $svcs=Get-CimInstance Win32_Service | Where-Object { $_.Name -like '*RustDesk*' -or $_.DisplayName -like '*RustDesk*' }; foreach($s in $svcs) { Stop-Service -Name $s.Name -Force; sc.exe delete $s.Name | Out-Null }; Write-Host '[3/5] Desinstallation du logiciel...'; $keys=@('HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*','HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'); $apps=Get-ItemProperty $keys | Where-Object { $_.DisplayName -like '*RustDesk*' }; foreach($app in $apps) { if($app.PSChildName -match '^\{[A-Fa-f0-9-]{36}\}$') { Start-Process msiexec.exe -ArgumentList ('/x ' + $app.PSChildName + ' /qn /norestart') -Wait } }; Start-Sleep -Seconds 3; Write-Host '[4/5] Suppression des fichiers et configurations...'; $paths=@('C:\Program Files\RustDesk','C:\Program Files (x86)\RustDesk','C:\ProgramData\RustDesk'); foreach($p in $paths) { if(Test-Path $p) { Remove-Item $p -Recurse -Force } }; $profiles=Get-CimInstance Win32_UserProfile | Where-Object { !$_.Special -and $_.LocalPath -like 'C:\Users\*' }; foreach($profile in $profiles) { foreach($folder in @('AppData\Roaming\RustDesk','AppData\Local\RustDesk')) { $p=Join-Path $profile.LocalPath $folder; if(Test-Path $p) { Remove-Item $p -Recurse -Force } } }; Write-Host '[5/5] Verification et nettoyage final...'; Get-Process -Name 'rustdesk' | Stop-Process -Force; Get-CimInstance Win32_Service | Where-Object { $_.Name -like '*RustDesk*' } | ForEach-Object { sc.exe delete $_.Name | Out-Null }; Write-Host ''; Write-Host 'Nettoyage termine.' -ForegroundColor Green" - -REM powershell.exe -NoProfile -ExecutionPolicy Bypass -Command ^ -REM "& { - REM $ErrorActionPreference = 'SilentlyContinue' - - REM Write-Host '[1/5] Fermeture de RustDesk...' - REM Get-Process -Name 'rustdesk' | Stop-Process -Force - REM Start-Sleep -Seconds 2 - - REM Write-Host '[2/5] Arret du service...' - REM $svcs = Get-CimInstance Win32_Service | Where-Object { - REM $_.Name -like '*RustDesk*' -or $_.DisplayName -like '*RustDesk*' - REM } - - REM foreach ($s in $svcs) { - REM Stop-Service -Name $s.Name -Force - REM sc.exe delete $s.Name | Out-Null - REM } - - REM Write-Host '[3/5] Desinstallation du logiciel...' - REM $keys = @( - REM 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*', - REM 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*' - REM ) - - REM $apps = Get-ItemProperty $keys | Where-Object { - REM $_.DisplayName -like '*RustDesk*' - REM } - - REM foreach ($app in $apps) { - REM if ($app.PSChildName -match '^\{[A-Fa-f0-9-]{36}\}$') { - REM Start-Process msiexec.exe -ArgumentList ( - REM '/x ' + $app.PSChildName + ' /qn /norestart' - REM ) -Wait - REM } - REM } - - REM Start-Sleep -Seconds 3 - - REM Write-Host '[4/5] Suppression des fichiers et configurations...' - REM $paths = @( - REM 'C:\Program Files\RustDesk', - REM 'C:\Program Files (x86)\RustDesk', - REM 'C:\ProgramData\RustDesk' - REM ) - - REM foreach ($p in $paths) { - REM if (Test-Path $p) { - REM Remove-Item $p -Recurse -Force - REM } - REM } - - REM $profiles = Get-CimInstance Win32_UserProfile | Where-Object { - REM !$_.Special -and $_.LocalPath -like 'C:\Users\*' - REM } - - REM foreach ($profile in $profiles) { - REM foreach ($folder in @( - REM 'AppData\Roaming\RustDesk', - REM 'AppData\Local\RustDesk' - REM )) { - REM $p = Join-Path $profile.LocalPath $folder - REM if (Test-Path $p) { - REM Remove-Item $p -Recurse -Force - REM } - REM } - REM } - - REM Write-Host '[5/5] Verification et nettoyage final...' - REM Get-Process -Name 'rustdesk' | Stop-Process -Force - - REM Get-CimInstance Win32_Service | Where-Object { - REM $_.Name -like '*RustDesk*' - REM } | ForEach-Object { - REM sc.exe delete $_.Name | Out-Null - REM } - - REM Write-Host '' - REM Write-Host 'Nettoyage termine.' -ForegroundColor Green -REM }" - -echo. -echo ========================================== -echo OPERATION TERMINEE -echo ========================================== -echo. -echo RustDesk a ete desinstalle et ses fichiers -echo de configuration ont ete supprimes. -echo. -echo Vous pouvez fermer cette fenetre. -echo. -pause \ No newline at end of file -- cgit v1.2.3