Update Win32 agent using MeshCore technique.

Ylian Saint-Hilaire committed Aug 12, 2021 at 10:31 UTC 1f7d09dcc51cbc1b1838fb360abcfe61e74ab151
1 file changed +1
meshagent.js
+1
@@ -1916,6 +1916,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
1916
1917 // No match, update the agent.
1918 if (args.agentupdatesystem === 2) return 2; // If set, force a meshcore update.
1919 + if (agentExeInfo.id == 3) return 2; // Due to a bug in Windows 7 SP1 environement variable exec, we always update 32bit Windows agent using MeshCore for now. Upcoming agent will have a fix for this.
1920 // NOTE: Windows agents with no commit dates may have bad native update system, so use meshcore system instead.
1921 // NOTE: Windows agents with commit date prior to 1612740413000 did not kill all "meshagent.exe" processes and update could fail as a result executable being locked, meshcore system will do this.
1922 if (((obj.AgentCommitDate == null) || (obj.AgentCommitDate < 1612740413000)) && ((agentExeInfo.id == 3) || (agentExeInfo.id == 4))) return 2; // For older Windows agents, use the meshcore update technique.