Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

167
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda