Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

438
Vistas
The for loop in shell script is not working with JavaScript (ActiveXObject)

I'm trying to close the previously opened pages in edge browser titled with "check out" before opening a new one but somehow the "for loop" used in the script is causing the issue. please find below the code snippet and suggest me some alternatives

<script>
     var shell = new ActiveXObject("WScript.Shell")
     var script = "msedge /new-window https://team2d-in.web.app/";
     var cmd = "for /F \"tokens=2 delims=,\" %g in ('TASKLIST /FI \"imagename eq msedge.exe\" /v /fo:csv /nh ^| findstr /r \"check out\"') do taskkill /f /pid %g";
     shell.run(cmd,0,true);
     shell.run(script);
</script>

Thanks in advance !

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda