Jump to content

System Exec with MSC File


Recommended Posts

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!

Link to comment

The following should work without the need for a batch file......

post-9410-1216662499.jpg?width=400

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.