Running a batch file after copy to local machine
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.
Rich
-
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. - studio196 10 years ago
Answers (3)
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)