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

168
Vistas
Multiple commands on button click callShellApplication?

in my JScript HTA script I have a button that executes a CMD command when I press it: <button onclick="callShellApplication('ipconfig')">Your IP-Adress</button> But this is only one command and I want to execute several. For example @echo hello + ipconfig, I need this because the system on which I execute the command has a CMD block, with the first command it always puts a cryptic character in front of it only with the second command is the command executed. So to get around that I want to execute two commands. How do I do that?

Best regards, jcjms

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I will be critiqued for a one line answer rather than adding a full related code block but this is a minor mod from someone else's answer at https://stackoverflow.com/a/70138712/10802527

    <button onclick="callShellApplication('cmd /d /c echo/ &ipconfig')">IP-Adress</button>

It is not perfect as it throws the black console widow up for a second before feedback is captured.

My excuse for the simplistic answer is it does exactly what was requested i.e. inject an echo before calling ipconfig.

It seems there may be some Admin autorun trap in cmd chain and using /D should help avoid that if also necessary.

If the echo is needed to acknowledge an autorun message, then it will not be needed if /d stops it acting thus that line may then simplified to:-

    <button onclick="callShellApplication('cmd /d /r ipconfig /all')">IP-Adress</button>
about 4 years ago · Juan Pablo Isaza Denunciar
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