Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 3 tasks
maieredv-manuel opened this issue Jun 24, 2024 · 20 comments
Open
1 of 3 tasks

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

maieredv-manuel opened this issue Jun 24, 2024 · 20 comments

Comments

@maieredv-manuel
Copy link

maieredv-manuel commented Jun 24, 2024

Server Info (please complete the following information):

  • OS: Debian 12
  • Browser: Chrome
  • RMM Version: 0.18.2

Installation Method:

  • Standard on LXC
  • Standard with --insecure flag at install
  • Docker

Agent Info (please complete the following information):

  • Agent version (as shown in the 'Summary' tab of the agent from web UI): 2.7.0
  • Agent OS: Windows 11 24H2

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
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Collaborator

dinger1986 commented Jun 24, 2024

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
Copy link
Author

maieredv-manuel commented Jun 24, 2024

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
Copy link
Collaborator

dinger1986 commented Jun 24, 2024

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
Copy link
Author

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
Copy link
Collaborator

yeah thats right

@maieredv-manuel
Copy link
Author

Thank you!

@wh1te909
Copy link
Member

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.

@johnnyq
Copy link

johnnyq commented Jul 12, 2024

There currently is an open issue for this in MeshCentral Git Issues See here
Ylianst/MeshCentral#6162

Not clear if its actively being working on though

How will this affect Windows 11 Machines updating to 24H2 will they break?

@maieredv-manuel
Copy link
Author

What ive seen until now it only a problem when you are installing the TRMM Agent on a fresh installed 24H2 Machine.
But when you have activated the WMIC Feature you can install TRMM with Mesh enabled.

@bbrendon
Copy link
Contributor

bbrendon commented Oct 6, 2024

@wh1te909 is the trmm agent installer going to be updated to install wmic.exe ? Or do we need to update our install process ourselves to install it first?

@dinger1986
Copy link
Collaborator

I know it was being looked at by Si as all the wmic commands can be replaced with native powershell commands.

I looked out all the commands and started checking the powershell alternatives then Si mentioned he was looking at it so I left it.

Happy to work on this as part of a group via the mesh or tactical discord.

@wh1te909
Copy link
Member

wh1te909 commented Oct 6, 2024

The installer/mesh works for me on 24H2 even though wmic is gone. I need to be able to reproduce the issue so I can fix the installer. What am I missing here?

chrome_QIKVcUrRuE

PS C:\Users\tactical> (Get-ItemProperty "HKLM:\Software\Microsoft\Windows NT\CurrentVersion").LCUVer
10.0.26100.1742
time="2024-10-06T14:33:50-07:00" level=info msg="Downloading mesh agent..."
time="2024-10-06T14:33:51-07:00" level=info msg="Installing mesh agent..."
[...Checking for previous installation of "Mesh Agent" [NONE]
...Installing service [DONE]
   -> Writing firewall rules for Mesh Agent Service... [DONE]
   -> Starting service... [OK]
 ]
time="2024-10-06T14:33:59-07:00" level=info msg="Adding agent to dashboard"
time="2024-10-06T14:34:09-07:00" level=info msg="Installing service..."
time="2024-10-06T14:34:10-07:00" level=info msg="Starting service..."

c:\cds>wmic
'wmic' is not recognized as an internal or external command,
operable program or batch file.

@wh1te909
Copy link
Member

wh1te909 commented Oct 6, 2024

This is a freshly installed 24H2 just downloaded the latest ISO today, so not an upgrade.

@Astorek86
Copy link

On a freshly installed Win11 24H4, it's possible to install WMIC through the Settings-App. After that, the Agent works fine again.

wmic

@wh1te909
Copy link
Member

wh1te909 commented Oct 7, 2024

I don't have wmic installed, but the agent still works. Trying to figure out why it still works for me, but nobody else.

@johnnyq
Copy link

johnnyq commented Oct 7, 2024

@wh1te909 Im going to Install 24h2 directly on a virtual Machine and give it a shot, ill let you know what the outcome is.

@lexisman
Copy link

I have 4 freshly installed windows 11 24h2, and all them has an issue with meshcentral agent installation, I tried to follow Astorek86 suggestions but there is no WMIC when I tried to search for it. Any one has another walk around for this issue, while we are waiting for the solution? Thanks.

@dinger1986
Copy link
Collaborator

Did you read the link to the meshcentral repo? There's a new agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants