Kaseya Community

K5 - tool to convert BAT files to K script

  • ConverttoKscript.txt
    Hi,

    Here is a little batch file I wrote to convert a batch file to a Kaseya 5 script.

    This way, you can work out all the little nigglies for a script in batch form, and when things are good to go, you can import to Kaseya.

    NOTE: I have only written and tested this script. I have not yet used it for creating a script so can't tell you it's success rate Wink

    Usage: converttokscript batchfile.bat

    Legacy Forum Name: K5 - tool to convert BAT files to K script,
    Legacy Posted By Username: chris@busy.co.nz
  • Cool idea. Thank you.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: SMason
  • Chris,

    This is going to fail in all sorts of horrible ways unfortunately.

    The reason is that each Execute Shell Command has a separate environment context, whereas a batch file has a single environment context.

    That is, if you define a variable on line one of the batch file, you won't be able to use it on line 3, once you convert the script.

    Andrew

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: andrew.doull@computer-care.com.au