Skip to content

Instantly share code, notes, and snippets.

@derekschartung
Last active June 8, 2023 18:31
Show Gist options
  • Select an option

  • Save derekschartung/ca18ec1f361b357e4834e287da9ac5e8 to your computer and use it in GitHub Desktop.

Select an option

Save derekschartung/ca18ec1f361b357e4834e287da9ac5e8 to your computer and use it in GitHub Desktop.
@echo off
taskkill /f /im gui.exe 2>nul
echo Waiting for Datto RMM to be removed...
"C:\Program Files (x86)\CentraStage\uninst.exe" /S 2>nul
powershell -ExecutionPolicy Bypass -Command "Start-Sleep -Seconds 10"
rmdir "C:\Program Files (x86)\CentraStage" /S /Q 2>nul
rmdir "C:\Windows\System32\config\systemprofile\AppData\Local\CentraStage" /S /Q 2>nul
rmdir "C:\Windows\SysWOW64\config\systemprofile\AppData\Local\CentraStage" /S /Q 2>nul
rmdir "%userprofile%\AppData\Local\CentraStage" /S /Q 2>nul
rmdir "%allusersprofile%\CentraStage" /S /Q 2>nul
REG delete "HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run" /v CentraStage /f 2>nul
powershell -ExecutionPolicy Bypass -Command "Start-Sleep -Seconds 10"
REM Begin new agent installation. Replace $tenantguid with actual value
powershell -ExecutionPolicy Bypass -Command "(New-Object System.Net.WebClient).DownloadFile('https://concord.centrastage.net/csm/profile/downloadAgent/$TENANTGUID', '$env:TEMP/AgentInstall.exe');start-process '$env:TEMP/AgentInstall.exe'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment