francis77 Trusted Contributor.
Trusted Contributor.
709 views

Running script to remove .xml not working

Hi,

I am having issues running a script to remove the .xml files from the following location on assigned devices:

C:\Program Files (x86)\Novell\ZENworks\work\inventory

The way I have done the script is:

1. Created the following .bat script and assigned it to run under the bundle ACtion > Launch > Define your Own script

echo Batch to delete file

del "C:\Program Files (x86)\Novell\ZENworks\work\inventory\*.xml" /s /f /q

echo Done!

Have also added the device on which the script is to be run however after running the script the .xml files are still not removed even after the launch action completes
Labels (1)
0 Likes
3 Replies
Knowledge Partner
Knowledge Partner

Re: Running script to remove .xml not working

francis77;2493354 wrote:
Hi,

I am having issues running a script to remove the .xml files from the following location on assigned devices:

C:\Program Files (x86)\Novell\ZENworks\work\inventory

The way I have done the script is:

1. Created the following .bat script and assigned it to run under the bundle ACtion > Launch > Define your Own script

echo Batch to delete file

del "C:\Program Files (x86)\Novell\ZENworks\work\inventory\*.xml" /s /f /q

echo Done!

Have also added the device on which the script is to be run however after running the script the .xml files are still not removed even after the launch action completes


Have you set to script to run as "system"? : https://www.novell.com/documentation/zenworks-2017-update-3/zen_cm_software_distribution/data/action_runscript.html

Also there is an specific bundle action for removing files, you could try that instead: https://www.novell.com/documentation/zenworks-2017-update-3/zen_cm_software_distribution/data/action_fileremoval.html

Also there is a specific forum for Windows Bundle questions: https://forums.novell.com/forumdisplay.php/1790-ZCM-Bundles-Windows 😉

Thomas
0 Likes
francis77 Trusted Contributor.
Trusted Contributor.

Re: Running script to remove .xml not working

I will try to run the script using system and see if that helps, thanks again thsundel!!
0 Likes
francis77 Trusted Contributor.
Trusted Contributor.

Re: Running script to remove .xml not working

For some strange reason it seems to work intermittently when deploying to smaller sites with the option checked "Continue of failure"
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.