4 Replies Latest reply on Feb 14, 2019 6:07 PM by John Messinger

    Issues PI ACE / Scripting.FileSystemobject


      Hello everyone


           I would appreciate any help.  I will try to explain my issues (sorry for my english, btw)


      I made program who collect points, then I put all points on a graph (using google charts examples), send those graphs by email, in a programmed schedule.  All of that works fine


      Issues that I'm facing is that I'm trying to move the file I send by email (attached) to a different destination.  To do this, I'm using FSO


      fso.CopyFile("c:\info.html", "\\server\graphs\Info.html", overwriteexisting)


      And it works, when I debug and run my program for testing, it works fine.  The file is sent to the correct destination, the problem begins when I register my program using PIACEWizard, when I check the time scheduled, the file it's not sent to the new destination, but at  "c:\" the file is working ok, the info is updated



      I stop the program and do testing again, and it works fine.  I dunno have an idea about what to do to make my program works when I register it using PIACEWizard.


      Thanks in advance,



        • Re: Issues PI ACE / Scripting.FileSystemobject
          John Messinger

          Hi Ray,


          This is likely a permissions issue on the destination file share. When you run the ACE module in debug mode it is running with your credentials and permissions. Once the module is registered and executed by the ACE Scheduler it is running with the credentials and permissions of the scheduler service. You will need to make sure that the ACE Scheduler service is running as a domain account that has write permission to the destination location. By default the scheduler runs under a local account such as LOCALSYSTEM.

            • Re: Issues PI ACE / Scripting.FileSystemobject

              Hello everyone,


                   I apologize for taking so much time to reply, I had differents issues, so I was off of the office for last 3 weeks.


              I'm not sure about how to change permissions of ACE Scheduler.  So, I tried with differents ways to be sure, that my program had permissions to write on differents locations.


              I tried using:


              a) System.security.securestring


              b) Wscript.Network


              and a few more.


              I noticed that I have issues on same code, because I divided my program depending of the schedule I need to send by e-mail and sharing files through the local network.  In the first two scheduled times it works good but last shift it failed even the code for sending emails it's identically than the first 2.


              I appreciate any help for solving this. I wish that I could explain my problem well.



              Thanks in advance,




                • Re: Issues PI ACE / Scripting.FileSystemobject
                  John Messinger

                  To change the permissions of the ACE Scheduler you really need to just change the account under which the PI ACE Scheduler service runs. In your scenario, you would typically change the Windows service to run under a domain account (such as a service account) that has the appropriate permissions (read/write) to the network file share that you want your ACE code to access.

                  1 of 1 people found this helpful
              • Re: Issues PI ACE / Scripting.FileSystemobject

                Hi Ray,


                I agree with John, I think first thing to check is that the service account running the PI ACE Scheduler has access to that file share.


                I'm not sure if you were aware of this, but with Notifications Rules in PI AF, you can configure emails to be sent based on triggering conditions, and these emails can contain attached files and/or links to PI Vision displays.


                You can find more information here in this Youtube playlist: OSIsoft: What are Notifications? - YouTube