Tag changes the difference between the code executed and the code executed by the console window

In this project, I want to copy a shared folder from another computer over a local area network. I ran into some issues, the same code can be executed in the console window, successfully copied to the folder, but put the code in the Tag to execute the error.
I want to run this code when the Tag changes. What do I need to do?

Different execution scopes and more importantly in this case, execution users. When you run code in a tag change event, it runsin the gateway scope, and if you haven't changed the user that the ignition service runs under, in Windows, it will default to the SYSTEM user which probably doesn't have access to write to your file share path. You'll need to change it to run under a service account (ie one whose password doesn't expire) that has access to the file share path


Also, drive letters for gateway services are independent of drive letters for users logged into a gateway server's desktop. While you can use settings in ignition.conf to set them up under ideal conditions, they cannot be made reliable. Use UNC paths to network file resources.

1 Like