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

Comments

  • 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.
Please log in to comment

Answers

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

Answered 10/01/2013 by: jknox
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share