Not sure what’s going on here. When I call something super simple from Perspective button:
system.util.execute(['notepad.exe'])
I get this error:
(And yes I realise that this will execute on the gateway and it’s not what I want to do. I’m actually trying to execute a batch file but this looked easier)
Any ideas?
Also, how would I execute a batch file? Do I have to call it through cmd?
e.g.
It’s going to run as the same user as the gateway service. In Linux I would use an SSH key with a program restriction to launch into a target user (even root) to run the script.
I’ve had best results by writing the .bat file from Ignition before executing it.
That also guarantees that the content of the .bat file is exactly where and what it is expected to be.
Weird, i failed a bunch trying that the other week, maybe i did somethingn else wrong xD
i kept trying to run the lnk with a path to an image as param and it just didnt work but if i used the bat directly it worked fine.
i also found a forum somewhere that they said that params dont work on lnks, idk
best to test if it works anyways i guess xd
ah maybe its because i ran the cmd from igntion with cmd c/ ? because this seems to happen in the cmdln
Altho that should happen with batfile too idk xD… thats why i avoid spaces as much as possible lol
i have no idea how it gets to run the batfile tho if it thinks half of the folder\test.lnk" is a param xD