/build/static/layout/Breadcrumb_cap_w.png

Deleting files via Kscript

I am writing an online kscript that will close out Outlook.exe and Communicator.exe then create 2 registry keys and then finally delete some .oab files out of a userprofile's directory.  I got everything working except the last part, deleting the .oab files.  I've tried running a bat file that does:

del "%userprofile%\AppData\Local\Microsoft\Outlook\Offline Address Books\7f0eee2e-2f1a-47df-8045-dff248ef125e\*.oab"

 

This works when I run it locally but if I do it from the K1000 then it doesn't do anything it just says the kscript has completed sucessfully.  When I look in the dir the files are still there.  I am running it as "All logged in users".  Anyone have any suggestions?

 


1 Comment   [ + ] Show comment
  • I've tried both ways. Running a .bat and .cmd file as a dependency and also by "Run a batch file" and pasting the commands in there. I'll enable debug and see what happens. - HomerM 11 years ago

Answers (1)

Posted by: jknox 11 years ago
Red Belt
0

When you run a dependency batch file from a kscript, all the K1000 knows is that the file attempted to run.  Successful in this case simply means that the script launched the batch file.

Are you calling a dependency batch file using "Launch a program" in your kscript, or are you using "Run a batch file" and pasting the commands into the "batch file" portion?  You might enable debug and try both methods and see if it helps.

Look in the runkbot log for your script and it may help:  http://www.kace.com/support/resources/kb/solutiondetail?sol=SOL112035

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
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