Developer Guide

  • 2021.3
  • 11/18/2021
  • Public

Applied Capsule Version Script

This script demonstrates how to get the version of the currently applied capsule on a Windows* OS target, so that the data streams optimizer tool can increment the version of the new capsule.
Windows* operating systems require the version of each new capsule to be incremented. Linux* operating systems do not require versioning. If the script is missing (in a Linux environment file, for example), the data streams optimizer tool sets the capsule version to “1” for the capsule create and apply scripts.
If you have a Windows* OS target with UEFI BIOS, you can use the example without modifications to run data streams optimizer.
If you have a different Windows* environment, you can copy and modify the script. The script must meet the following requirements to maintain compatibility with the data streams optimizer:
  • Input: No arguments.
  • Output: The script must only print the capsule version in decimal format to STDOUT.
  • Error handling: Any nonzero value returned from the script will be interpreted as an error. Any additional logging should be printed to STDERR.
Command line: tools/target_scripts_win/ STDOUT: 42 Return value: 0 STDERR: empty

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at