Local check on windows not being picked up

it’s probably the LocalSystem issue, yes. I solved the problem by just running the script on a linux box and it works fine.

Edit: that’s not the issue, actually. I used psexec.exe to run a cmd.exe as the SYSTEM account and then ran the bat file and it works just fine.