Automatically Running a Script When DIAdem Launches

Updated Mar 19, 2024

Environment

Software

  • DIAdem

I would like to have a script automatically run every time I launch DIAdem. How can I do this?

There are two ways how to run the script when DIAdem launches:
 
  • Using built in option that allows a script to run upon DIAdem starting up. (Available for DIAdem 10 and later) 
Follow the steps below to use this setting.
 
  1. Launch DIAdem and open one of the DIAdem panels. 
  2. Select Settings»DIAdem Settings»General.
  3. Click the Browse button next to the Start script category.
  4. Select the script you want and click load.
  5. Click OK and then exit DIAdem.
  6. Upon exiting DIAdem, a dialog box will appear asking you if you want to save your changes. Click Save and Exit.
Restart DIAdem and notice after the program starts, DIAdem runs the specified script.
 
  • Launching DIAdem with "/c" Start Parameters
Follow the steps below to run a script upon DIAdem launching:
 
 
  1. Navigate to your DIAdem directory typically located at the path C:\Program Files\National Instruments\DIAdem x.x
  2. Right-click on DIAdem.exe and select Create Shortcut.
  3. Right-click the new shortcut and select Properties.
  4. In the shortcut tab, there is a textbox called Target with the path to the DIAdem executable. Append to the end of the text, /cscriptstart('path to your script'). For example, if you have a script on the C drive called Demo.vbs, the entire entry for the Target textbox should read: "C:\Program Files\National Instruments\DIAdem xx\DIADEM.exe" "/cscriptstart('C:\Demo.vbs')"
    DIAscript2EN.PNG
  1. After entering the above text, click OK.
  2. Double-click on the shortcut and notice after the program starts, DIAdem runs the specified script.

Additional Information

In DIAdem 9.1 and earlier, there is no built in option that allows a script to run upon DIAdem starting up - for those versions you will need to use second method presented in this article.