Hi everyone,
I’ve written a small python script as PreTaskScript for Deadline.
The script is creating a file via tasklist command in windows command line, using >c:\Path\to\OutputFile.txt
For example:
import subprocess
def __main__ () :
user="whateveryouneed"
ssh_command = [
"tasklist",
"/nh",
"/fi", "WINDOWTITLE eq whatever",
"/fo", "csv",
">c:\\logs\\{}\\whatever.log".format(user),
]
subprocess.call(ssh_command, shell=True)
When I run this command with DeadlineCommand everything works fine
When running this as PreTaskScript in Deadline nothing happens.
Ich changed the th path to tasklist to be absolute instead of command only,
I changed the command to a simple dir or just tried to us start cmd to open a windows command line window.
All of those are working fine with DeadlineCommands, but none of them is working from within a PreTaskScript.
Everything else I am doing with the PreTaskScript, like running another program or reading the logfile from above or even deleting it, is working as intended. So the PreTaskScript is working.
Are windows commands blocked? UAC is turned of one the slaves.
What am I overlooking?
Thanks
Best regards
C.