Script Utility Packages
When deploying a script through OptiTune, sometimes your script needs to call upon other scripts or executable files. While you could install these tools on every computer you may execute your script on, it's often much more convenient to simply bundle these tools alongside your script.
OptiTune ".bvx" files provide a simple, secure way to distribute your tool files, similar to a zip file, but they are encrypted using your organization's certificate, so only computers enrolled in your organization can decrypt them.
When you create or edit a Script Task, you have the option of specifying a script utility package to upload, in addition to the main script file itself. The utility package is entirely optional for a script task.
Creating a Utility Package
To create a utility package, you need to first download the Package Creator tool from OptiTune. If you haven't already downloaded this tool, go to Applications > Install Tasks > Add, and you can download it using the "Package Creator Tool" link in the Getting Started section:
Unzip "PackageCreator.zip" to a local directory on your hard drive, such as "C:\PackageCreator"
Select the tools directory you want to package up, for example, "C:\tools". The entire folder "C:\tools" will be packaged up, and it will be expanded into the same directory as your script file before executing your script. So, if you have a script "foo.cmd", and tool
"C:\tools\mytool.exe", "foo.cmd" will be in the same directory as "mytool.exe" when it is executed by the OptiTune client on a computer. The entire directory structure of "C:\tools" will also be preserved, and expanded into the same directory as your script.Create a directory "C:\packages" for storing your output bvx files
Open up a command prompt, and cd to "C:\PackageCreator"
In the command prompt, run "CreateBvx.exe account.cert C:\tools C:\packages\mytools.bvx"
This will package up the entire C:\tools directory into C:\packages\mytools.bvx, using the "account.cert" included in PackageCreator.zip to encrypt the package
Now, you can upload "mytools.bvx" as part of your script task, whenever you have a script that requires them. Keep in mind that this package file is unique to your organization, and can only be used by computers in your organization. It cannot be shared with other OptiTune organizations or users.
Note that if your script is encountering an error in using the tools package, you can often troubleshoot this by including "dir" as the first command in the script, to output the directory structure to the console, and see what is in the same directory as the script. You can then view the console output from the deployment result to resolve any errors.