amidaware / tacticalrmm

A remote monitoring & management tool, built with Django, Vue and Go.
https://docs.tacticalrmm.com
Other
2.92k stars 422 forks source link

Not a real Bug: MeshCentral cant be installed on Win11 24H2 #1901

Open maieredv-manuel opened 1 week ago

maieredv-manuel commented 1 week ago

Server Info (please complete the following information):

Installation Method:

Agent Info (please complete the following information):

Describe the bug Its not a real bug ... i dont know if this is a known "problem" ... but ive got a message that i cant install TRMM on a fresh installed Win11 24H2, because MeshCentral isnt supported on 24H2. Its because 24H2 hasnt installed/enabled WMIC by default. When installing manually via cmd with "-nomesh" argument, installation is OK.

Expected behavior It not a real problem with TRMM, so ive would like if there is a option to set "nomesh" for the EXE-installer. And/or is it possible (as a workaround) to implement the installation of WMIC in the EXE-Installer, if there are also dependencies from TRMM to WMIC!?

dinger1986 commented 1 week ago

Ok, so this is more a feature request than a bug, you would like either WMIC to be checked and then installed prior to mesh install or when generating the exe installer be able to hard code nomesh rather than having to do that manually.

For now I guess you can create a powershell installer that will work with a deployment link and some variables and have the -nomesh flag set in it

maieredv-manuel commented 1 week ago

Ah, yes ... sure - sorry for that.

Yes, that would be nice when there were an option for enbaling automatic installation of WMIC (for the moment until all dependencies are solved - i think MS will remove WMIC sooner or later in a upcoming release).

Aah, okay, i see with the deployment Methode its easy with "nomesh" argument. Thats for that info!

dinger1986 commented 1 week ago

so soemthing like this from https://docs.tacticalrmm.com/install_agent/#scripting-agent-installation:

Invoke-WebRequest "<deployment URL>" -OutFile ( New-Item -Path "c:\ProgramData\TacticalRMM\temp\trmminstall.exe" -Force )
$proc = Start-Process c:\ProgramData\TacticalRMM\temp\trmminstall.exe -ArgumentList '-silent' -PassThru -nomesh
Wait-Process -InputObject $proc

if ($proc.ExitCode -ne 0) {
    Write-Warning "$_ exited with status code $($proc.ExitCode)"
}
Remove-Item -Path "c:\ProgramData\TacticalRMM\temp\trmminstall.exe" -Force

Or if we wanted to be really smart we could change the powershell script to detect if wmic is installed and install it if its not detected, then Exit if it doesnt install

# Check if WMIC is available
$wmicPath = "C:\Windows\System32\wbem\WMIC.exe"

if (Test-Path $wmicPath) {
    Write-Output "WMIC is installed. Installing TRMM now"
} else {
    Write-Output "WMIC is not installed. Installing TRMM without Mesh, you want to install WMIC for full functionality"
Invoke-WebRequest "<deployment URL>" -OutFile ( New-Item -Path "c:\ProgramData\TacticalRMM\temp\trmminstall.exe" -Force )
$proc = Start-Process c:\ProgramData\TacticalRMM\temp\trmminstall.exe -ArgumentList '-silent' -PassThru -nomesh
Wait-Process -InputObject $proc

if ($proc.ExitCode -ne 0) {
    Write-Warning "$_ exited with status code $($proc.ExitCode)"
}
Remove-Item -Path "c:\ProgramData\TacticalRMM\temp\trmminstall.exe" -Force
}
Invoke-WebRequest "<deployment URL>" -OutFile ( New-Item -Path "c:\ProgramData\TacticalRMM\temp\trmminstall.exe" -Force )
$proc = Start-Process c:\ProgramData\TacticalRMM\temp\trmminstall.exe -ArgumentList '-silent' -PassThru
Wait-Process -InputObject $proc

if ($proc.ExitCode -ne 0) {
    Write-Warning "$_ exited with status code $($proc.ExitCode)"
}
Remove-Item -Path "c:\ProgramData\TacticalRMM\temp\trmminstall.exe" -Force
maieredv-manuel commented 1 week ago

Ive done it this way: (in "-ArgumentList")

`Invoke-WebRequest "" -OutFile ( New-Item -Path "c:\ProgramData\TacticalRMM\temp\trmminstall.exe" -Force ) $proc = Start-Process c:\ProgramData\TacticalRMM\temp\trmminstall.exe -ArgumentList '-silent -nomesh' -PassThru Wait-Process -InputObject $proc

if ($proc.ExitCode -ne 0) { Write-Warning "$_ exited with status code $($proc.ExitCode)" } Remove-Item -Path "c:\ProgramData\TacticalRMM\temp\trmminstall.exe" -Force`

For now "nomesh" is needed for installation on 24H2, because even if WMIC is installed MeshCentral wont install on 24H2.

Are there any dependencies on TRMM side for WMIC? If no, then it should be OK for the Moment. But i think it would be nice to have the option for skipping the MeshCentral installation via GUI!?

dinger1986 commented 1 week ago

ah ok, no it shouldnt effect using TRMM but some of the data is collected using WMI so you might have some incomplete data on the machine until its install, I have adjusted the If statement above then to just install with nomesh

maieredv-manuel commented 1 week ago

So the new Script cheks if WMIC is installed, when not (probably only on 24H2), it installs with "nomesh" argument!? When WMIC is installed (all others), it installs without "nomesh" argument!?

Am i right?

dinger1986 commented 1 week ago

yeah thats right

maieredv-manuel commented 1 week ago

Thank you!

wh1te909 commented 1 week ago

to be clear, wmic.exe is going away, not WMI. tactical agent does NOT use wmic.exe to collect data, it queries the WMI database, so tactical isn't affected at all. unfortunately it appears the mesh agent shells out to executables and parses the output to gather info, which is never a good way to do things.