Windows permissions issue when calling a systme.util.execute command help

I know this is tangentially related to Ignition but I am sure others here have faced this issue and I need help resolving it and its a two parter.

  1. Calling the command correctly. In command prompt, the person who asked for this changed directory until he is in C:\\Projects\\Code\\builds\\\Integration\\OmnicExecute and then ran omicexceute -- Maximize Window to run his program. Is system.util.execute(['C:\\Projects\\Code\\builds\\\Integration\\OmnicExecute', 'omicexceute -- Maximize Window']) the proper way to do this then?

  2. I get a java.io.IOException: Cannot run program 'C:\\Projects\\Code\\builds\\\Integration\\OmnicExecute': CreateProcess error=5: Access is denied. So obviously it’s a permissions issue but I need help resolving it. This computer has 4 users, 2 of which are admin, but the user that the operator will be running the client in (an account called User blegh) is not administrator. The Ignition gateway service is logged in as Local System Account with Allow service to interact with desktop. I am not that familiar with Windows user groups/security- since I have 4 defined users, I don’t know which one Local Systems Account is referring to, or is it some anonymous type of limited privilege account? I have tested running the command prompt line in the User account and it executes there (without command prompt in admin mode). I am struggling to figure out how to rectify this. I figure I should be changing to an actual username instead of just local systems account but which one makes the most sense? One of the administrator accounts? Or the User account since that is what the client is going to be used in and that the vision client will be running in?

Any guidance is appreciated. Thank you

The execute parameters don’t look right to me. The first element in the list should be also have the executable, not just the path. Right now you’re just trying to execute the path as an executable.

After that I’m not sure. Maybe 2nd element would be -- and third would be Maximize Window.

None of the gateway service details matter because you aren’t going to execute this in gateway scope (right? Right?)

2 Likes

You’re right, I don’t know why I got on about the gateway logon service. It will be the client executing this. So I am going to say that part is fine and I am not going to touch it. Thanks for talking some sense into me lol.

It ended up needing to be
system.util.execute(["C:\\Projects\\Code\\builds\\\Integration\\OmnicExecute\\OmniExecute.exe","--","MaximizeWindow"]) and this worked as expected it.

2 Likes