When you try to use the copy/xcopy command in a bacth included as a dependencay in your script you will get a silent failure.
No error returned
No file copied
I get questions about this several times a week.
The solution?
Instead of :
xcopy C:\Programdata\Dell\Kace\Kbox\path\kbot\package\file.ext %userprofile%\Desktop\
Use the following instead:
start /wait xcopy C:\Programdata\Dell\Kace\Kbox\path\kbot\package\file.ext %userprofile%\Desktop\
This also works with other commands that have issues running from withing the Scripting enviroment in KACE because they try to execute before the script releases control of the files they are trying to manipulate.
Give it a try.
Comments