So I've been trying to use the CLI of a program that handles licenses (VLC - Vector License Client), by reading the output of a command ("Vector.LicenseClient -listlicenses -DisableLogging -v") which lists said licenses.
My issue: when I run the following command:
output = subprocess.check_output(self.licensecommand, cwd=self.licensepath, text= True, shell = True)
it runs differently on (as far as I'm concerned) two identically set up computers.
On windows computer "A", the command runs in the background, gives output it's stdout and the script finishes correctly. On windows computer "B", the command opens a new shell (with the name of the command) and runs the command there, asking for confirmation by pressing any button, which pauses and kills the script. I tried running the command directly in cmd, and in that case it behaved normally on both computers, meaning it simply listed the licenses to the cmd where the command was called.
I tried calling the command without shell, but whatever I did, it could not recognize the command that way.
I also tried killing and timing out the new shell, but it completely blocks the script.
I naturally saw some nice solutions on other posts, but all of those were OS-specific and did not work on Windows. (like os.killpg)
I'm unfortunately not big on Python, and while I'm slowly learning, this is far beyond me.
The solution to my problem:
Solution for only being able to call command with shell = True:
I could only run the command without shell set to true if I called the full path of the command. Meaning isntead of calling "command -params" + shell = True I had to call "C:\full\path\to\command -params" + shell = False
The solution for the shell pop-up blocking the script:
It was an issue/bug with a certain version of the executable, and/or with the fact that the host PC had a different version installed than the remote PC it worked together with.
Thanks to everyone for the help in the comments.