Use the BuildTSD.exe executable to automate builds of TestStand Deployment Utility files and to make modifications to deployment utility files before the build occurs. BuildTSD.exe accepts a .tsd deployment configuration file and supports optional parameters for configuring properties of the build. It will also return a numeric code to provide information about whether the build completed successfully or failed due to an error.

Supported Command Line Arguments

BuildTSD.exe supports the <Optional Changes> with the following command line arguments:

  • Mode Tab
  • System Source Tab
  • Installer Options Tab
  • Advanced Options Dialog
  • Drivers and Components Dialog
  • Process Options
  • Patching Specific Options

Mode Tab

Option Type Notes
/outputMode Enumeration Possible values:
  • Image
  • MSIInstaller
  • PackageDistribution
/packageDistMode Enumeration Possible values:
  • SinglePackage
  • Repository
  • PackageInstaller

System Source Tab

Option Type Notes
/deployTSWorkspace Boolean
/workspacePath Absolute Path You must set the /deployTSWorkspace flag to include the specified workspace in the deployment.
/deployDirectory Boolean
/directoryToDeploy Absolute Path
/includeSubdirectories Boolean
/deployTSPublicDirectories Boolean
/deployTSCfgDirectory Boolean
/deployableImage Boolean
/ActiveEnvironmentFile Absolute Path
/DeployEnvironmentFile Boolean

Installer Options Tab

Option Type Notes
/createInstaller Boolean This flag is included for backwards compatibility. For new applications, use the /outputMode flag with the value MSIInstaller instead of this flag.
/installationName String
/installerDirectory String
/startMenuItemGroup String
/defaultInstallationBaseDir Enumeration Possible values:
  • WindowsVolume
  • Teststand
  • Windows
  • System
  • System32
  • ProgramFiles
  • StartMenu
  • Startup
  • Desktop
  • Personal
  • Temp
  • NationalInstruments
  • TSPublic
  • TSAppData
  • AbsolutePath
/doNotAskUserForInstallationDirectory Boolean
/defaultInstallationSubdirectory String
/installerLanguage Enumeration Possible values:
  • English
  • French
  • German
  • Japanese
  • Korean
/installTSEngine Boolean
/hideLicenseDialog Boolean

Advanced Options Dialog

Option Type Notes
/manufacturer String
/versionString String Use format #.#.#
/autoIncrementVersion Boolean
/upgradeCode String Use a GUID of the form {21EC2020-3AEA-1069-A2DD-08002B30309D}
/readmeFile Path
/licenseAgreement Path
/mediaSizeMB Integer
/includeNetworkLicenseServerSettings Boolean
/specifyConfigurationDirectory Boolean
/configDestination Enumeration Possible values:
  • Installation
  • Teststand
  • Windows
  • System
  • System32
  • ProgramFiles
  • StartMenu
  • Startup
  • Desktop
  • Personal
  • Temp
  • NationalInstruments
  • TSPublic
  • TSAppData
/configSubDirectory Relative Path
/alternateAssociationSeqFiles Absolute Path
/processModel Enumeration Possible values:
  • NoChange
  • ForceDefaultModels
  • ForceLegacyModels
/installerExecutableName String If no value is specified, Deployment Utility uses the default value of install.exe.

Drivers and Components Dialog

Option Type Notes
/includeHardwareConfiguration Boolean
/hardwareConfigurationFile Absolute Path
/displayDialogDuringImport Boolean
/MAXImportOptions Enumeration Possible values:
  • Merge
  • Replace
  • Preserve

Process Options

Option Type Notes
/copyLogFiles <FilePath> Absolute Path Copies the log files from the build to the <FilePath> location. The path must be a directory.
/LoadTSDOnly - This option will just launch the TSDU and perform the operations specified without automatically performing the build and shutting down.This is useful for checking your command line parameters manually.
/SaveTSDFile <FilePath> Absolute Path Saves the .tsd file after the build to the <FilePath> location.
Note The /LoadTSDOnly argument should be used only without any extra arguments.

Patching Specific Options

Option Type Notes
/SetDistribution Enumeration Possible values:
  • Full
  • Patch
/UserFilesToInclude Enumeration Possible values:
  • IncludeChangedFiles
  • DoNotIncludeFiles
  • Manual
/UpgradesandPatchesToInclude Enumeration Possible values:
  • TSEngineandDrivers
  • TSEngine
  • Drivers
  • None
/DependOn Enumeration Possible values:
  • FullDeployment
  • BaselinePatchDeployment
Note For boolean options use the strings TRUE and FALSE.

BuildTSD.exe Exit Codes

The Deployment Utility returns one of the following return values after building a TSD:

Exit Codes

Number Result Definition
0 Success The build succeeded without errors or warnings.
1 Load failed The TSD file failed to load.
2 Aborted The TSDU was aborted while building, the installer was not built.
3 Fatal error The TSDU encountered a fatal error while building.
4 Built with errors The TSDU created an installer but there were some errors while building.
5 Built with warnings The TSDU created an installer but there were some warnings while building.
6 Could not start the TSDU The TSDU could not be found.
7 TSDU did not return a value This can happen if the TSDU crashes before being able to communicate the result to the caller process.
8 No build performed TSDU exited without performing a build.