LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control Windows Utilities using LabVIEW e.g. disk defragmenter

I need to perform a scheduled disk defragment/disk clean on a number of systems so I thought I'd see if it was possible to write a program to do this for me i.e. on a certain date LabVIEW automatically opens the disk defragmenter and runs it. I can't seem to make sense of the ActiveX controls for this in LabVIEW and not sure if this is even possible with ActiveX? Has anyone been able to control any similar Windows utilities using LabVIEW. Any help is greatly appreciated.
 
Thanks.
0 Kudos
Message 1 of 4
(2,449 Views)
Hi topside,

you can control programs when they provide ActiveX-(or other) interfaces.

Other option would be to start the program by "System exec" function and simulate mouse-clicks (or key input), search for "simulate mouse click" here in the forum.

For disk defragmentation you may setup a scheduled task in Windows, independently from LabViewSmiley Wink

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,438 Views)

You can just call

defrag C:\ -f

with SystemExec.vi

regards,

Andrey.

0 Kudos
Message 3 of 4
(2,436 Views)
Ahhhh of course system the System Exec vi!!! Thanks guys you saved me a lot of hassle!!
0 Kudos
Message 4 of 4
(2,429 Views)