OrangeAndGreen Posted July 22, 2008 Report Share Posted July 22, 2008 Hi to all, I'm trying to launch the Disk Defragmenter (C:\WINDOWS\system32\dfrg.msc) from LabView, but via several attempts I have only gotten the Windows error 193 (invalid Win32 application) or a floating command (DOS) window. Here is a summary of the inputs and results for System Exec for the tests I've tried: Command Directory StdIn Result dfrg.msc . (blank) Error 193 "C:\WINDOWS\system32\dfrg.msc" . (blank) Error 193 cmd . dfrg.msc Command window in current VI directory cmd C:\WINDOWS\system32 dfrg.msc Command window in system32 directory If I run either of the first two Command values using the Windows "Run..." the Defragmenter is launched. Does anyone have any suggestions? I'd really appreciate the help! By the way, for those who replied to my post in March about preparing for the CLD (incidentally, it disappeared from the LAVA forum), I passed with flying colors and am proud to now call myself a Certified LabView Developer! Thanks again for the studying tips. Nevermind, I figured out a solution while playing around. For those who are curious, I created the following batch (.bat) file: C:\WINDOWS\system32\dfrg.msc exit Calling the batch file with System Exec successfully launches the Defragmenter. I guess I was too eager to ask for help! Quote Link to comment
mbrowne Posted July 22, 2008 Report Share Posted July 22, 2008 The following should work without the need for a batch file...... QUOTE (OrangeAndGreen @ Jul 21 2008, 05:22 PM) Nevermind, I figured out a solution while playing around. For those who are curious, I created the following batch (.bat) file:C:\WINDOWS\system32\dfrg.msc exit Calling the batch file with System Exec successfully launches the Defragmenter. Quote Link to comment
OrangeAndGreen Posted July 26, 2008 Author Report Share Posted July 26, 2008 Indeed, that works without the use of a batch file. Thanks for the tip! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.