“executar o comando PowerShell do JavaScript” Respostas de código

JavaScript Execute PowerShell Script

var spawn = require("child_process").spawn,child;
child = spawn("powershell.exe",["c:\\temp\\helloworld.ps1"]);
child.stdout.on("data",function(data){
    console.log("Powershell Data: " + data);
});
child.stderr.on("data",function(data){
    console.log("Powershell Errors: " + data);
});
child.on("exit",function(){
    console.log("Powershell Script finished");
});
child.stdin.end(); //end input
vlT

executar o comando PowerShell do JavaScript

while True:
    choices = ["rock","paper","scissors"]

    computer = random.choice(choices)
    player = None

    while player not in choices:
        player = input("rock, paper, or scissors?: ").lower()

    if player == computer:
        print("computer: ",computer)
        print("player: ",player)
        print("Tie!")

   
            print("computer: ", computer)
            print("player: ", player)
            print("You win!")

    play_again = input("Play again? (yes/no): ").lower()

    if play_again != "yes":
        break

print("Bye!")
Unusual Unicorn

Respostas semelhantes a “executar o comando PowerShell do JavaScript”

Perguntas semelhantes a “executar o comando PowerShell do JavaScript”

Mais respostas relacionadas para “executar o comando PowerShell do JavaScript” em JavaScript

Procure respostas de código populares por idioma

Procurar outros idiomas de código