Click here to Skip to main content
11,922,026 members (38,146 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB
I want to run dos commands from a GUI interface. I want to create a Visual Program that will execute dos commands in the command shell in windows 7. Ok so for example lets say i want to run defrag in the cmd prompt.. I would type Defrag and then enter. Instead i would like to just click a button to do this job in a visual basic program.
Posted 17-Jan-13 18:09pm
PIEBALDconsult 17-Jan-13 23:22pm
You, ah, could've just edited the other version. Oh, I see, you changed from C++ to VB.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can create a form that has a button on it.
When you click it, use Process as described at Run a Command Line Tool as a Windows Application in C#[^].
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 493
1 Dave Kreskowiak 285
2 Sergey Alexandrovich Kryukov 243
3 Richard MacCutchan 155
4 ppolymorphe 135
0 OriginalGriff 7,231
1 KrunalRohit 4,530
2 Sergey Alexandrovich Kryukov 3,356
3 George Jonsson 2,865
4 Suvendu Shekhar Giri 2,216

Advertise | Privacy | Mobile
Web03 | 2.8.151120.1 | Last Updated 17 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100