Quantcast
Channel: Shavlik User Community : All Content - Ivanti Patch for Windows
Viewing all articles
Browse latest Browse all 2126

Custom Action - Delete Specific File

$
0
0

Template

1604_157_49_cache.png

 

                 

Symptoms


This document outlines how to use a Custom Action to delete a specific file from a target machine.

 

                 

Steps


This custom action uses the CMD syntax to delete a file. Because Custom Actions are run as the Local System account, they must be run in a silent/unattended/quiet mode as no prompts will show up on a target machine for a user.

  1. Create a NewDeployment Template;enter a Name for theTemplate, andSaveit.
  2.  
        
    1. Alternatively - open an existingDeployment Templateyou wish to modify.
    2.  
  3. Click theCustomActionstab.
  4. Click theNewoption.

1-deployment template.png

  1. In the Custom Actions window, leave Step 1 as 'All deployments using this template', Step 2 will remain disabled, Step 3 set to 'Before any patches', and Step 4 enter the following:DEL /Q "PATH TO SPECIFIC FILE"
  2.  
        
    1. DEL- Delete one or more files.
    2.   
    3. /Q- Quiet mode, do not give a Yes/No Prompt before deleting.
    4.   
    5. "PATH TO SPECIFIC FILE"- The full path to the file that should be deleted.
    6.  

 

Example:DEL /Q "C:\Windows\ProPatches\Patches\Wireshark-win64-1.8.9.exe"
This would Quietly delete the Wireshark patch located at C:\Windows\ProPatches\Patches\ on the machine we deployed to.
More Info: http://ss64.com/nt/del.html

2-custom action.png

  1. Deploy the null patch (or use with any other patch deployment) and before the patches are installed the command to delete the specific file will execute.

Viewing all articles
Browse latest Browse all 2126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>