I am trying to copy and uncompress a folder using the below online kscript. The copy and creation of the folder works fine however launching the .bat file does not work.

If more info is needed please let me know.


Answer Summary:
1 Comment   [ - ] Hide Comment


  • I've added the correct path however it doesn't appear to even get to the Remediation part. The activity log ends at unzipping and nothing after that.
Please log in to comment

Answer this question or Comment on this question for clarity



You'll need to use CMD.EXE from the Windows System folder.

Answered 05/30/2014 by: vjaneczko
Eighth Degree Black Belt

Please log in to comment

Why are you using cmd.exe? Why not just use the "Run a batch file" option and enter the contents of your script in there?

Answered 05/30/2014 by: Michael4732
Purple Belt

Please log in to comment

So remediation will only run if your verify fails. Look at it as how do you want to remediate this first step not being there. Your verify is looking for your ZIP file that you uploaded as a dependency. So that verify will always be successful, and then unzip. It will never move to the remediate since it was successful.

I'm not sure exacltly what your .bat is doing, but you may want to try something like this.

Verify: Look for a file or registry key that you .bat is copying.

Success: Log message. .bat already ran (or something similiar)

Remediation: Launch $(KACE_DEPENDENCY_DIR)\CPUU_Update.bat (still uploading you ZIP as a dependency)

Answered 05/30/2014 by: dugullett
Red Belt

Please log in to comment
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja