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

Windows 11 24H2 gui closing and wmic deprecation #6162

Open
djsvi opened this issue Jun 7, 2024 · 13 comments
Open

Windows 11 24H2 gui closing and wmic deprecation #6162

djsvi opened this issue Jun 7, 2024 · 13 comments
Assignees

Comments

@djsvi
Copy link

djsvi commented Jun 7, 2024

I note various mesh agent functions depend on wmic.exe.

Microsoft deprecated wmic.exe some time ago and won't enable it by default on Windows 11 24H2, so now seems like an opportune time to remove this dependency.

https://techcommunity.microsoft.com/t5/windows-it-pro-blog/wmi-command-line-wmic-utility-deprecation-next-steps/ba-p/4039242

EDIT FROM @si458:
when running the meshagent on windows 11 24h2+ (or server 2025+) the GUI WONT RUN!

the fix is simply install WMIC add on (Settings App -> System -> Optional Features -> Add an optional feature)
then install meshagent
OR
try the new test agents, by copying them
from node_modules/meshcentral/agents/test_agents/*
to node_modules/meshcentral/agents/*
then restarting meshcentral,
then redownloading the meshagents
OR
install from the command line meshagent64-mygroup.exe -fullinstall

@djsvi djsvi added the bug label Jun 7, 2024
@si458
Copy link
Collaborator

si458 commented Jun 14, 2024

this isnt easy and will be a big job!
as the wmic command is also embedded in the meshagent so it means we will have to build/release new agents!

in the mean time you can still enable the wmic again!
https://www.elevenforum.com/t/add-or-remove-wmic-command-feature-in-windows-11.5119/

@johnnyq
Copy link

johnnyq commented Jul 12, 2024

Cross Link here for it affecting TacticalRMM use of Meshcentral
amidaware/tacticalrmm#1901

@si458
Copy link
Collaborator

si458 commented Nov 3, 2024

we have started to sort this out! Ylianst/MeshAgent#254 (comment)
pushed a commit to meshagent which fixes the split error so at least u can now run the agent!
but still quite a few places that contain wmic which needs replacing!

@si458 si458 self-assigned this Nov 3, 2024
@si458
Copy link
Collaborator

si458 commented Nov 7, 2024

i have an updated agent for people to test if they want!
Its fully compiled with all the bug fixes from the meshagent repo including replacing wmic with the win-wmi we already had and mouse cursor blinking

  1. download zip and extract zip MeshService64.exe.zip
  2. backup the MeshService64.exe from inside node_modules/meshcentral/agents/ (or rename to something else)
  3. place the new MeshService64.exe back in node_modules/meshcentral/agents/
  4. stop meshcentral
  5. IMPORTANT: DISABLE AUTO AGENT UPDATE OTHERWISE ALL AGENTS WILL GET AUTO UPDATED!!!
    set "noAgentUpdate": 1 inside of settings in your config.json
  6. start meshcentral
  7. IMPORTANT: LET MESHCENTRAL RESIGN/RECUSTOMISE THE SINGLE FILE!
  8. skip this step if you dont code-sign yourself
    copy the new signed agent from inside signed-agents located inside of meshcentral-data to your machine,
    code-sign the exe however you want/do it,
    put the new code-signed exe back into agents replacing the old MeshService64.exe
    (backing up the old code-signed version of yours first),
    restart meshcentral
  9. pick a device and go into its Console tab and run agentupdate
  10. you should see the device go offline and then back online, and in theory the date/version will of changed!

edit: you can also them download a new meshagent from the 'addagent' tab and it should work on 24h2 machines for install/run

@tobias9931
Copy link

Hello @si458 ,

I am very happy that MeshCentral is still being worked on so intensively, that new functions are constantly being added and that core functions are also being updated here in particular 😊
Very good job! ❤️

A quick question:
What are your plans for when the new agents without WMIC will become standard?

Best regards

@Juraszka
Copy link

For temporarily workaround installation problem for 24h2, new downloaded agent could check if wmic is installed, and if it is not, execute the command: DISM /Online /Add-Capability /CapabilityName:WMIC~~~~​

@si458
Copy link
Collaborator

si458 commented Jan 10, 2025

@Juraszka we have already removed the requirement for wmic in a new agent version,
these agents exist in agents/test_agents if you wanted to test them
you simply copy them from agents/test_agents/* to agents/* and restart meshcentral

@chdodier
Copy link

chdodier commented Jan 13, 2025

@si458 @Ylianst
Thank You so much for your greatworks guys
I have been using Meshcentral for 2 years now and it is a real gem.
I wish I had your dev skills to help you guys out but all I can do is test and report.... or ask for Improvements.
I have tested the new agent and it works on server 2025 fresh install and Windows 11 24H2 without wmic.

@si458 si458 pinned this issue Jan 15, 2025
@si458 si458 changed the title WMIC.exe deprecation - not installed by default in Windows 11 24H2 Windows 11 24H2 gui closing and wmic deprecation Jan 15, 2025
@sammyke007
Copy link

Any timeline when the new test agents will become default?

@si458
Copy link
Collaborator

si458 commented Jan 28, 2025

just updating this issue for people, the new test_agents are included in the meshcentral release,
so you dont need to download my version anymore, do these steps below instead

  1. backup the *.exe from inside node_modules/meshcentral/agents/ (or rename to something else)
  2. move the new test agents from node_modules/meshcentral/test_agents/ to node_modules/meshcentral/agents/
  3. stop meshcentral
  4. IMPORTANT: DISABLE AUTO AGENT UPDATE OTHERWISE ALL AGENTS WILL GET AUTO UPDATED!!!
    set "noAgentUpdate": 1 inside of settings in your config.json
  5. start meshcentral
  6. IMPORTANT: LET MESHCENTRAL RESIGN/RECUSTOMISE THE SINGLE FILE!
  7. skip this step if you dont code-sign yourself
    copy the new signed agent from inside signed-agents located inside of meshcentral-data to your machine,
    code-sign the exe however you want/do it,
    put the new code-signed exe back into agents replacing the old *.exe
    (backing up the old code-signed version of yours first),
    restart meshcentral
  8. pick a device and go into its Console tab and run agentupdate
  9. you should see the device go offline and then back online, and in theory the date/version will of changed!
    you can verify this in the Console tab, it showing the version number (top right) or typing info

you can also them download the new meshagent from the 'addagent' tab after you do the steps above
and it should work on 24h2 machines for install/run now as the agents dont require wmic anymore

EDIT: @sammyke007 will speak to @Ylianst and see when he thinks its OK to move the agents to being the default 👍

@sammyke007
Copy link

Tnx @si458. I'm running the dockered version of MeshCentral. Inside the container
@ /opt/meshcentral/meshcentral/agents/test_agents I have the 6 following .exe files:

-rw-r--r--    1 root     root       4624488 Jan 26 19:11 MeshCmd.exe
-rw-r--r--    1 root     root       4252264 Jan 26 19:11 MeshCmd64.exe
-rw-r--r--    1 root     root       4310120 Jan 26 19:11 MeshCmdARM64.exe
-rw-r--r--    1 root     root       3811840 Jan 26 19:11 MeshService.exe
-rw-r--r--    1 root     root       3439616 Jan 26 19:11 MeshService64.exe
-rw-r--r--    1 root     root       3497472 Jan 26 19:11 MeshServiceARM64.exe

Are these the correct ones?

@si458
Copy link
Collaborator

si458 commented Jan 28, 2025

Yes that's the correct ones, and u move those files one level up as it where
Also remember if its docker, don't docker compose down/up!
Instead just restart the container!

@sammyke007
Copy link

Correct, otherwise I'll lose the changes 😅

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

No branches or pull requests

7 participants