To address the issue follow these steps:
- Open CMD.EXE with admin rights
- Write command net stop ampagent
- Delete the contents of C:\ProgramData\Dell\KACE\patches\ including sub-directories.
- Start the agent service again net start ampagent.
- Run the detect and deploy job again.
- Observe the results.
If the folder needs to be deleted from multiple devices, perform the following steps:
The important part to notice is the Operating System selection, in which if anything else is chosen but just the Microsoft Windows then K1000 does not show option Run Batch file. If you have chosen Operating System with fine grain detail, this does not work, the setting has to be the general targeting to Microsoft Windows -systems.
The selector /S enables RMDIR command to remove the folder and any subfolders and contents within. Selector /Q enables the command to run quietly without prompting the user.
- Go to Scripting | Scripts and select Choose Action: New
- Provide a name. For example: Delete Folder
- Select the Enabled check box
- Select Online KScript from the Type drop down menu
- Select Production from the Status dropd own menu
- Provide a summary of the script purpose in the Description field. For example: "Script to delete C:\ProgramData\Dell\KACE\patches\ -folder and everything in it."
- Optional: Provide some more detailed information in the Notes field
- In the Deploy section, configure the script to reflect the client environment
- This script is suitable for individual managed devices, use the Devices field to select the IP Addres(ses). Alternatively you can use labels as well.
- In the Deploy section, configure the following settings for the Operating System:
- Clear the Select Specific Operating System check box, if checked, and select Microsoft Windows.
- Leave the Schedule settings as default and unchanged. The None setting is selected by default.
- No dependencies will be used in this script.
- Under the Task section, select New Task
- Leave the following settings by default:
- Attempts: 1
- On Failure: Break
- Under Verify, select Add and choose: Verify a directory exists...
- Enter the directory path in the Directory field, for example:
- Select Save Changes
- Under On Success, select Add and choose: Launch a program...
- Directory: %SYSTEMROOT%
- File: cmd /c
- Select the Wait for completion checkbox
- Parameters: rmdir C:\ProgramData\Dell\KACE\patches\ /s /q
- Select Save Changes
- Select either Save or Run Now
- Selecting Run Now will present a confirmation to save the script before executing the script.