for /f %a ('npm config get prefix') do setx path %a # https://stackoverflow.com/a/2340018/2618535 # https://stackoverflow.com/a/889578/2618535