Example Code

Simple TestStand Deployment using Custom Commands

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • Teststand

Code and Documents

Attachment

Overview

This example demonstrates the use of Custom Commands to create a simple folder structure at "C:\someFolder\someSubFolder" at the end of a test stand deployment installation.

 

Hardware and Software Requirements

TestStand 2012 (or compatible)

 

Steps to Implement or Execute Code

Creating the batch file

1.) Open the test.bat file in a text editor from windows explorer.

2.) Notice that the mkdir command is used to create a directory structure at "C:\someFolder\someSubFolder"

___________________________________________________________________________________________________________________________________________________________

 

Building the Installer

1.) Unzip the "TestStand Temp.zip" folder

2.) Open the "testDeployment.tsd" file. This will launch the TestStand Deployment Utility.

3.) Click on the "Installer Options" tab

4.) Verify the correct Installer Directory.

5.) Click on "Custom Commands"

6.) Note the call to "test.bat" in the installation directory. This implies that the "test.bat" batch file will be called at the end of the installation to run the list of commands specified within the file.

7.) Build the TestStand deployment. This should build the installer to the directory specified in the Installer Directory in Step 4.

 

________________________________________________________________________________________________________________________________________________________________

 

Installing the Application

1.) Open the Installer Directory in Windows Explorer and navigate to the "Installer\Volume1" folder.

2.) Run the "Setup.exe" file in the Volume1 folder

3.) Let the installation complete

4.) Navigate to the "C:\" directory in Windows Explorer

5.) Note the presence of folder "C:\someFolder\someSubFolder"

 

Raj
National Instruments
Applications Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.