docs updating install agent script
@@ -93,6 +93,20 @@ If you want to deploy the TRMM agent using AD, intune, mesh, teamviewer, Group P
You will need to replace `deployment url` with your custom deployment URL
```bat
+@echo off
+
+REM Setup deployment URL
+set "DeploymentURL="
+
+set "Name="
+for /f "usebackq tokens=* delims=" %%# in (
+ `wmic service where "name like 'tacticalagent'" get Name /Format:Value`
+) do (
+ for /f "tokens=* delims=" %%g in ("%%#") do set "%%g"
+)
+
+if not defined Name (
+ echo Tactical RMM not found, installing now.
if not exist C:\TEMP\TRMM md C:\TEMP\TRMM
powershell Set-ExecutionPolicy -ExecutionPolicy Unrestricted
powershell Add-MpPreference -ExclusionPath C:\TEMP\TRMM
@@ -101,10 +115,15 @@ powershell Add-MpPreference -ExclusionPath C:\Windows\Temp\winagent-v*.exe
powershell Add-MpPreference -ExclusionPath "C:\Program Files\Mesh Agent\*"
powershell Add-MpPreference -ExclusionPath C:\Windows\Temp\TRMM\*
cd c:\temp\trmm
-powershell Invoke-WebRequest "deployment url" -Outfile tactical.exe
-"C:\Program Files\TacticalAgent\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /FORCECLOSEAPPLICATIONS
-start tactical.exe
+ powershell Invoke-WebRequest "%DeploymentURL%" -Outfile tactical.exe
+ REM"C:\Program Files\TacticalAgent\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /FORCECLOSEAPPLICATIONS
+ tactical.exe
powershell Remove-MpPreference -ExclusionPath C:\TEMP\TRMM
+ rem exit /b 1
+) else (
+ echo Tactical RMM already installed Exiting
+ Exit 0
+)
```
There is also a full powershell version [here](https://wh1te909.github.io/tacticalrmm/3rdparty_screenconnect/#install-tactical-rmm-via-screeconnect-commands-window)
