Example Code

Task Manager

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

  • LabVIEW

Code and Documents

Attachment

Overview
This is a simple VI that aims to illustrate the abilities of the system exec function

 

Description

In this example, pulling list shows the currently executing process, click and choose from one of these processes and terminate it.

CMD task list command to get a full list of the processes which is displayed  on a front panel indicator.

The program wait for an event to exit or to kill a process using the CMD Task Kill function.

 


Requirements

  • LabVIEW 2012 (or compatible)

Steps to Implement or Execute Code

  1. Run VI.

 

Additional Information or References
VI Block Diagram

 Block Diagram.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Aaron. E
Product Performance Engineer
Dyson

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

Comments
Alex.T
Active Participant
Active Participant
on

Sup Aaron! That's a pretty cool example. In the Event Structure it might be worth using a Case Structure to check whether someone's hit the Stop Process button with the 'Select Process' option in the Combo Box still enabled. This would prevent any false commands generated.


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

terickson
Member
Member
on

I think you have to put quotes (") around the name of the application you are terminating if if contains spaces.  At least on Windows XP.

CLA