4 Replies Latest reply on Sep 18, 2012 4:06 AM by zman

    REMDEL Command

    honeydew83 Apprentice

      Anyone knows how to use this command? I have checked in the previous post and found an example using this below command.

       

      MACHINES]

      REMDEL01=%ldms_Client_dir%\sdmcache\*.*

       

       

      I tried using this command to delete an executable file on client machine but it is not successfull.

       

      MACHINES]

      REMDEL01=%ldms_Client_dir%\produkey.exe\*.*

       

      The task is marked successfull but the file is not deleted. Can anyone help me on this? Thanks

       

       

      Rgds.

      Aya

        • 1. Re: REMDEL Command
          MarXtar ITSMMVPGroup

          Try this instead:

           

          [MACHINES]

          REMDEL01=%ldms_Client_dir%\produkey.exe

           

          I assume produkey.exe is the file, your original was treating the file as a directory.

           

          Mark McGinn

          MarXtar Ltd

          http://landesk.marxtar.co.uk

          LANDesk Silver ESP

           

          The One-Stop Shop for LANDesk Enhancements

          - Wake-On-WAN - Distributed Wake-On-LAN, Scheduled Power Down, and SWDist Sequencing

          - State Notifier - Real-Time Device & User State Inventory Updating & Alerting

          Update - WoW & State Notifier now integrate for even more functionality

          Update - State Notifier now detects machine and user Idle states

          • 2. Re: REMDEL Command
            honeydew83 Apprentice

            Thanks a lot for the reply. I have tried that but the result is still the same, the file still not deleted on the client machine.

             

            This is the log file:

            "Machine","CbaStatus","ExitCode","Duration","Begin","End","Command"

            ; "Job Complete","1 Done","0 Failed","0 Off","0 Unknown"

            • 3. Re: REMDEL Command
              MarXtar ITSMMVPGroup

              I just tested this by creating a file called produkey.exe in the ldclient folder on a client and targeting it with the script I gave you. The file was deleted.

               

              "Machine","CbaStatus","ExitCode","Duration","Begin","End","Command"

              "MACHINE","OK",0,0:00:01,9/18/2012 5:45:31 AM,9/18/2012 5:45:32 AM,"cmd /c del /q "C:\Program Files\LANDesk\LDClient\produkey.exe""

              ; "Job Complete","1 Done","0 Failed","0 Off","0 Unknown"

               

              This was my log. Notice that it lists the machine I targeted and the command it ran. The one you posted started with MACHINES] - was that just a faulty copy and paste? It should start with [MACHINES].

               

              I've included my script for you. So first, verify that the file you want to delete is actually in c:\program files\LANDesk\LDClient (which is where the %ldms_client_dir% points) and then that your script is the same as mine.

               

              ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

              ;

              ;  LANDesk(R) Management Suite Custom Script

              ;

              ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

               

               

              ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

              ; JOBPARAM = Controls various configuration options on a per script basis. 

              ; The following is a sample of what this section might look like:

              ;

              ;          [JOBPARAM]

              ;          MAX_CUST_JOB_THREADS=120

              ;          MAX_MULTICAST_THREADS=10

              ;          MAX_MC_FAILURE_THREADS=60

              ;          STEPS=1

              ;          TASK_COMPLETION_ENABLED=FALSE

              ;

              [JOBPARAM]

               

               

               

               

              ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

              ; PREMACHINE - Processed once at start of job.  Only the local (LOCxxx)

              ; commands can be used in this section.  Use this section as well for

              ; jobs with no associated machines.

              [PREMACHINE]

               

               

               

               

              ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

              ; MULTICAST - This section is used to control the targeted multicast.

              [MULTICAST]

               

               

               

               

              ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

              ; MACHINES - This section is run once for each machine in the target set. 

              ; Commands in this section will be processed in the order they are listed

              ; in the custom script.  This section supports both local (LOCxxx) and remote

              ; (REMxxx) commands.

              [MACHINES]

              REMDEL01=%ldms_Client_dir%\produkey.exe

               

               

              ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

              ; MACHINES_95 - After the commands in the MACHINES section have been processed

              ; this section will be processed for each machine that is a Windows* 9x system. 

              ; The type of computer is determined by the information returned by PDS when

              ; the computer is discovered. Like the MACHINES section this section can include

              ; both local (LOCxxx) and remote (REMxxx) commands.

              [MACHINES_95]

               

               

               

               

              ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

              ; MACHINES_NT - After the commands in the MACHINES section have been processed

              ; this section will be processed for each machine that is a Windows NT* or

              ; Windows* 2000 system.  The type of computer is determined by the information

              ; returned by PDS when the computer is discovered. Like the MACHINES section

              ; this section can include both local (LOCxxx) and remote (REMxxx) commands.

              [MACHINES_NT]

               

               

               

               

              ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

              ; POSTMACHINE - After all of the individual machines have been processed the

              ; commands in this section are processed.  If there were no machines that can

              ; be run in the scheduled task this section will not be processed. This section

              ; only supports the local (LOCxxxx) commands.

              [POSTMACHINE]

              • 4. Re: REMDEL Command
                zman Master

                In addition to what mark stated, sometime environment variables can be very finnicky. I always make sure they are case sensitive so I would try %LDMS_LOCAL_DIR%, make sure the file is not read only or locked, and the device has a valid full inventory scan.