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

  • Bootstrapper ,

    This script procedure file is in response of Meena to dbettens request above. We would like to know if this is your request as well. json files are python script procedures that you can import on the ITSM Portal to automate tasks.

    Comment


    • Hi Orexi

      Good Day!

      I'd like to request a script to uninstall Kaseya Agent from our workstations.

      This is the command line we run to uninstall, but would like to create a procedure on comodo to run.

      CD "\Program Files (x86)\Kaseya\99999933875344039710"
      KASetup.exe /r /s /g 99999933875344039710 /l "%TEMP%\kasetup.log

      Thank you!
      Regards
      Elie
      I have completed the script for your request, please refer the below JSON file to achieve your need.
      20181003-Uninstall-kaseya.json

      Let us know your feedback.
      Thank you

      Comment


      • Hi Bootstrapper


        Kindly please refer the below JSON file for your request.

        20180919-Password-Expire-in-the-specific-period-of-time.json

        Please refer the wiki guide to import the JSON file in ITSM for execution

        https://wiki.comodo.com/frontend/web...and-execute-it

        To edit the parameters refer the following link :

        https://wiki.comodo.com/frontend/web...ith-parameters

        NOTE: Parameters to be edited
        • Type: Integer.
        • ITSM Label: Give any name you want.
        • Default value: Provide your Password Expire days.

        Run the script as a system user.

        Let us know your feedback.

        Comment


        • Originally posted by Prabakaran View Post
          Hi Orexi



          I have completed the script for your request, please refer the below JSON file to achieve your need.
          [ATTACH]n29529[/ATTACH]

          Let us know your feedback.
          Thank you
          Thank you! Working Great! Appretiate it.

          Comment


          • Need help with this script if possible.

            Supposed to:

            Download .zip from url, extracts to c:\dma, deletes downloaded.zip

            {Works up to this point}

            Then I want to copy ("C:\DMA\mstsc.exe.manifest","C:\Windows\System32\ mstsc.exe.manifest") -tried last 2 lines but they don't work.

            Finally Execute C:\DMA\PreferExternalManifest.reg silently.

            don't mind if variables are used or not.






            destination_folder = r"C:\DMA" ## Here mention the path where the application should be copied on endpoint

            fromURL='http://domain.com/example.zip'## Here mention the download url



            import os

            if not os.path.exists(destination_folder):

            os.makedirs(destination_folder)



            import ctypes

            class disable_file_system_redirection:

            _disable = ctypes.windll.kernel32.Wow64DisableWow64FsRedirect ion

            _revert = ctypes.windll.kernel32.Wow64RevertWow64FsRedirecti on

            def __enter__(self):

            self.old_value = ctypes.c_long()

            self.success = self._disable(ctypes.byref(self.old_value))

            def __exit__(self, type, value, traceback):

            if self.success:

            self._revert(self.old_value)



            import subprocess

            with disable_file_system_redirection():

            import urllib

            Down_path=os.environ['PROGRAMDATA']

            fileName = fromURL.split('/')[-1]

            DownTo = os.path.join(Down_path, fileName)

            def downloadFile(DownTo, fromURL):

            try:

            with open(DownTo, 'wb') as f:

            f.write(urllib.urlopen(fromURL).read())

            if os.path.isfile(DownTo):

            return '{} - {}KB'.format(DownTo, os.path.getsize(DownTo)/1000)



            except:

            return 'Please Check URL or Download Path!'



            if __name__=='__main__':

            print downloadFile(DownTo, fromURL )





            import shutil

            try:

            shutil.move(DownTo, destination_folder)

            print("%s is copied to %s"%(DownTo, destination_folder))

            print "File copied successfully"

            except Exception as err :

            print err

            import zipfile

            import ctypes



            src_path=r'C:\DMA\mstscexe_manifest.zip'

            dest_path=r'c:\DMA'



            class disable_file_system_redirection:

            _disable = ctypes.windll.kernel32.Wow64DisableWow64FsRedirect ion

            _revert = ctypes.windll.kernel32.Wow64RevertWow64FsRedirecti on

            def __enter__(self):

            self.old_value = ctypes.c_long()

            self.success = self._disable(ctypes.byref(self.old_value))

            def __exit__(self, type, value, traceback):

            if self.success:

            self._revert(self.old_value)



            def filezip(src_path,dest_path):

            with disable_file_system_redirection():

            with zipfile.ZipFile(src_path,"r") as zip_ref:

            zip_ref.extractall(dest_path)

            print 'file unzipped to ' +dest_path



            filezip(src_path,dest_path)

            os.remove("C:\DMA\mstscexe_manifest.zip")

            #from shutil import copyfile

            #copyfile("C:\DMA\mstsc.exe.manifest","C:\Windows\ System32\mstsc.exe.manifest")

            Comment


            • Prabakaran
              Prabakaran commented
              Editing a comment
              Hi @phlib

              Could you please share the exact URL link for the above request so that we have proceed further step to fulfill your need.
              Thank you

          • Hi PhilB

            We will analyze your request and update you once the script has been completed.

            Thank you

            Comment


            • Hi PhilB

              eed help with this script if possible.

              Supposed to:

              Download .zip from url, extracts to c:\dma, deletes downloaded.zip

              {Works up to this point}

              Then I want to copy ("C:\DMA\mstsc.exe.manifest","C:\Windows\System 32\ mstsc.exe.manifest") -tried last 2 lines but they don't work.

              Finally, Execute C:\DMA\PreferExternalManifest.reg silently.

              don't mind if variables are used or not.
              I have completed the script for above request, please refer the below JSON file to achieve your need.
              20181015-Extract-zip-file-and-execute-the-reg-file.json

              Note:

              1. You have to pass the URL in the parameter section

              Refer the wiki to run the procedure with parameters
              .
              https://wiki.comodo.com/frontend/web...ith-parameters

              2.Exanple:

              Parameter Configuration :

              >) Type : String

              >) ITSM Label : Url

              >) Default Value : https://xyz.zip

              Before running the script you have to enabled default value in the configuration parameter.

              Let me know your feedback.

              Thank you
              Attached Files
              Last edited by Prabakaran; 10-15-2018, 01:15 PM.

              Comment



              • Hello, good afternoon can you help me by creating a script. I need a script that searches all the units for a folder. the moment you find the folder, delete it

                Comment


                • renato2330 ,

                  We have corrdinated with our Scriupt Developers for your request. We'll provide you feedback of their results as soon as possible.

                  Comment


                  • renato2330
                    renato2330 commented
                    Editing a comment
                    thank you very much I'll be waiting

                • Hi renato2330

                  Good day to you
                  We will analyze your request and update to you once the script has been completed.
                  ​​​​​​
                  Thank you

                  Comment


                  • Hi renato2330

                    Hello, good afternoon can you help me by creating a script. I need a script that searches all the units for a folder. the moment you find the folder, delete it
                    I have completed the script please refer the below JSON file to achieve your need.

                    20181016-search.json

                    Note:
                    1.Refer the below link to import the JSON file to ITSM procedure

                    https://wiki.comodo.com/frontend/web...and-execute-it

                    2. You have to pass the URL in the parameter section

                    Refer the wiki to run the procedure with parameters
                    .
                    https://wiki.comodo.com/frontend/web...ith-parameters

                    2. Exanple :

                    Parameter Configuration :

                    >) Type : String

                    >) ITSM Label : Search

                    >) Default Value : Needed folder name

                    Before running the script you have to enabled default value in the configuration parameter.

                    Let me know your feedback.

                    Thank you

                    Comment


                    • Hi Prabakaran

                      execute the process. But when I finish the process, I run an error. I would also like to know if the script works when the folder is in the D drive or any other unit
                      2018/10/16 09:51:43 AM Failed Deleting Directory DeletedC:\caprtea de eliminacion Deleted Successfully
                      x:12: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
                      2018/10/16 09:48:21 AM Started Procedure parameters: search_folder string caprtea de eliminacion

                      Comment


                      • Hi renato2330

                        As per your comments, I have updated the script, Please refer the below JSON file
                        20181017-Updated-search-script.json

                        Note:
                        Please give the folder name and drive in the above script

                        search='xxx' #please give the Folder name which you want to delete
                        Drive="C:" #Please give the drive name

                        Run as system user

                        Thank you
                        Attached Files

                        Comment


                        • hi Prabakaran

                          Good afternoon, I tried the script again but now it does not delete the folder. He indicated that it is being used by another process. even though the folder is empty


                          2018/10/17 12:07:38 PM Finished success Deleting Directory The Folder working in another processD:\Parche2
                          2018/10/17 12:07:37 PM Started

                          Comment


                          • Prabakaran
                            Prabakaran commented
                            Editing a comment
                            Hi @renato

                            Sorry for your inconvenience, I have tested the script Its working fine on our side. Please ensure that Run the script as system user.
                            Thank you

                        • renato2330 ,

                          We thank you for sharing the output of your test. We have coordinated with our Script Developers and we'll provide you with their feedback as soon as possible.

                          Comment


                          • renato2330
                            renato2330 commented
                            Editing a comment
                            Thank you very much for your response, are attentive to your comments.
                        Working...
                        X