Files

9 lines
306 B
Python

import subprocess
def run_command(cmd, directory):
command = subprocess.run(["powershell", "-Command", cmd], cwd=directory, shell=True, check=True)
return command
def run_command_no_dir(cmd):
command = subprocess.run(["powershell", "-Command", cmd], shell=True, check=True)
return command