Python run Powershell command wmic?

Viewed 21

I'm trying to run this in my Python script:

subprocess.check_output("(wmic PROCESS WHERE name=`'LeagueClientUx.exe`' GET commandline | Select-String -Pattern '--remoting-auth-token=([\w-]*)')")

but it keeps saying "The system cannot find the file specified", but when I run it on powershell, it works. What am I doing wrong?

0 Answers
Related