Announcement

Collapse
No announcement yet.

Script Requests - Itarian team will write the scripts for you :) for FREE.

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hello balldigy ,

    By now, we don't have any hosted link on local file server but we have a similar feature request already in the roadmap for software repository in C1 or Endpoint Management, where you can upload setup files, from where you can select them to be deployed through EM and/or RMM which has a long term (12months+) planned implementation.

    KRegards,
    Jay
    ITarian Staff

    Comment


    • Please check the following script link balldigy: Install application from file path

      In the script, you will have to replace the 'filepath' with the path of your local shared repository plus the name of the executable file. The 'command' variable will take the parameters you would like to include when you launch the executable file through this script. '/s' is for silent installation as without it, there will be a need for user interaction on the target endpoint.

      If you do not have a copy of CIS (Premium), unfortunately, we will not be able to provide you any links for it. As CIS is a consumer product, you will need to reach out to consumer support / forum about it.

      Comment


      • My company need a procedure script that will ask for etch computer about a creation of a specific file in a directory.
        calculate the days that past after the creation of the file and display it on the dashboard.
        the color of the days will be green if days >= 3 , yellow if it is days >3 && days<=12 and red if it is days>12

        this is a sample that works on python 3.7.2:

        #!/usr/bin/python
        import os
        import time

        def main():
        fileUpdated()

        def fileUpdated():
        t1 = os.path.getmtime("C:\PosLocal\CnfgPath.log")
        t2 = time.time()
        t3 = (t2 - t1) / 86400
        print(t3)
        if t3 <= 3.0:
        print("green")
        elif t3 > 3.0 and t3 <= 12.0:
        print("yellow")
        else:
        print("red")
        if __name__ == '__main__': main()

        Comment


        • I've been trying to write a script to apply a Windows 10 start layout, here's what I have so far. It needs to run with admin credentials so I've been running it as local system. The issue however is that the powershell line doesn't work, it responds that Import-startlayout is not a valid powershell command

          Here's what I have so far:

          import urllib
          import os
          import subprocess
          tempdir=os.environ['TEMP']+'\\start layout'
          programdata=os.environ['PROGRAMDATA']
          systemdrive=os.environ['systemdrive']
          if not os.path.exists(tempdir):
          os.makedirs(tempdir)
          urllib.urlretrieve ("http://constco.com/downloads/startlayout/layout.xml", tempdir+"\\layout.xml")
          print subprocess.check_output('"powershell.exe" -ExecutionPolicy Bypass -Command Import-StartLayout -LayoutPath \''+tempdir+'\\layout.xml\' -MountPath $env:SystemDrive\\;exit 0')

          Comment


          • We need the results to be displayed on the dashboard of your console.
            what is the python version that you are using in order to run scripts on your console?

            Comment


            • Please consult this forum topic for further details about your inquiry isaac levi.

              Comment


              • I need a script to remove all local admin accounts except for user like "helpdesk".

                Thank you!

                Comment


                • stephan2018 ,

                  we have forwarded your request to our Script Developers for analysis. We'll provide you with their output as soon as possible

                  Comment


                  • Jimmy Thank you for the update!

                    Comment


                    • Hi Scripting Guru's;

                      I would like to be able to build out procedures that email data to my PSA system so I can manage all the work and people there; I've been playing around with it but figured you guys can probably just give me a code snippit that does the following and I can incorporate it into any procedures I want to report in via email;

                      I need to know how to pull the following information from the agent in question and include it in the email.

                      Company Name
                      Computer Name
                      Logged in user Name

                      And then email that information to a specified address;

                      Thanks for your help,
                      Mathew.

                      Comment


                      • My company need a procedure script that will ask for each computer about a creation of a specific file in a directory.
                        calculate the days that past after the creation of the file and display it on the dashboard.
                        the color of the days number will be green if days >= 3 , yellow if it is days >3 && days<=12 and red if it is days>12

                        the result will be displayed in the comodo one console in the monitor section

                        Comment


                        • Not sure if this should be a script or just a feature request, but how about a script to be used until the feature request is implemented?

                          I would like a custom script that can be used as a condition for a Monitor. I would like a script that can:
                          Watch the "System" event log for EventID 7045, and where the "Service File Name" is located in %systemroot% or %temp% or %appdata%

                          It would also be helpful if there was a way to watch for new registry keys created in:
                          "HKEY_CURRENT_USER\Software\Microsoft\Windows\ Curr entVersion\Run" or "HKEY_LOCAL MACHINE\Software\Microsoft\Windows\CurrentVersion\ Run" or "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\servi ces"
                          but I don't know if that would even be possible without a way to see a before-and-after of each key. Maybe it would be possible to create a baseline by copying all keys and values from the specific "RUN" location to a backup key in the "Software\Comodo" location, then compare the values in the "RUN" location to the baseline/backup key? That could be resource-intensive, so it would have to be able to be limited in the frequency of running or monitoring.

                          Perhaps the second script could just be something scheduled to run once per day and then alert via email or ticket, instead of it being a custom script for a monitor.

                          Adding each of those as a feature would be great. Right now, the existing event monitor isn't specific enough, and therefore alerts on all 7045 events (of which 99% are legitimate). It would help temporarily if the existing ticket and email created for the event ID monitor at least contained the text of the event, but it doesn't. If the text were in the ticket, it would negate the need to look on the specific machine for all 7045 events (which is very time consuming).
                          Last edited by mschubeck; 01-23-2019, 05:56 PM.

                          Comment


                          • isaac levi
                            isaac levi commented
                            Editing a comment
                            We have a path that is the same path for all of our workstations "C:\PosLocal\CnfgPath.log" and we want to know when the file was created or changed.
                            This is possible to check with the os lib.

                            Here is the code that I wrote it just need to be hoked to the monitor and desplayed one the comodo one console.
                            I'm not sure how to do it.


                            #!/usr/bin/python
                            from os import path
                            import datetime



                            def main():
                            fileUpdated()

                            def fileUpdated():
                            if path.exists("C:\PosLocal") and path.isfile("C:\PosLocal\CnfgPath.log"):
                            fRes = open("C:\PosLocal\Res.txt","w+")
                            t1 = datetime.datetime.fromtimestamp(path.getmtime("C:\ PosLocal\CnfgPath.log"))
                            t2 = datetime.datetime.now()
                            td = t2 - t1
                            print("days:"+str(td.days)+" hours:"+str(td.seconds//3600)+" minutes:"+str((td.seconds//60)%60)+" from last modifiy")
                            print(td)
                            fRes.write("CnfgPath.log last modify "+str(td.days)+" days ago\n")
                            if td.days <= 3:
                            print("green")
                            fRes.write("status green\n")
                            elif td.days > 3 and td.days <= 12:
                            print("yellow")
                            fRes.write("status yellow")
                            else:
                            print("red")
                            fRes.write("status red")
                            fRes.close()

                            if __name__ == '__main__': main()

                        • Hello isaac levi

                          As of now we do not have option to print the color statment as we are supporting python 2.7 version. We have created a feature request to mkae it as a part of our Endpoint manager availability. We will update you once the task is available.

                          Thank you

                          Comment


                          • mschubeck, MathewJek

                            Our Script Developers are still analyzing your request. We have created a support ticket to keep in track its progress.
                            Last edited by Jimmy; 01-24-2019, 01:22 PM.

                            Comment


                            • Thank you. For the time being can we use a script to monitor the file modification with the script bellow?
                              Instead of writing in to a file write to the console?

                              #!/usr/bin/python
                              from os import path
                              import datetime

                              def main():
                              fileUpdated()

                              def fileUpdated():
                              if path.exists("C:\PosLocal") and path.isfile("C:\PosLocal\CnfgPath.log"):
                              fRes = open("C:\PosLocal\Res.txt","w+")
                              t1 = datetime.datetime.fromtimestamp(path.getmtime("C:\ PosLocal\CnfgPath.log"))
                              t2 = datetime.datetime.now()
                              td = t2 - t1
                              print("days:"+str(td.days)+" hours:"+str(td.seconds//3600)+" minutes:"+str((td.seconds//60)%60)+" from last modifiy")
                              print(td)
                              fRes.write("CnfgPath.log last modify "+str(td.days)+" days ago\n")
                              if td.days <= 3:
                              print("green")
                              fRes.write("status green\n")
                              elif td.days > 3 and td.days <= 12:
                              print("yellow")
                              fRes.write("status yellow")
                              else:
                              print("red")
                              fRes.write("status red")
                              fRes.close()

                              if __name__ == '__main__': main()

                              Comment

                              Working...
                              X