diff --git a/npm-packages/meteor-installer/install.js b/npm-packages/meteor-installer/install.js index 1598e0b893..9f98f0e8d5 100644 --- a/npm-packages/meteor-installer/install.js +++ b/npm-packages/meteor-installer/install.js @@ -302,7 +302,9 @@ async function setup() { async function setupExecPath() { if (isWindows()) { // set for the current session and beyond - child_process.execSync(`setx path "${meteorPath}/;%path%`); + child_process.execSync( + `powershell -c "$path = (Get-Item 'HKCU:\\Environment').GetValue('Path', '', 'DoNotExpandEnvironmentNames'); [Environment]::SetEnvironmentVariable('PATH', \\"${meteorPath};$path\\", 'User');"`, + ); return; } const exportCommand = `export PATH=${meteorPath}:$PATH`;