/build/static/layout/Breadcrumb_cap_w.png

Using copy command in your K1000 scripts

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

This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ