Click here to Skip to main content
13,090,678 members (44,524 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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 17: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
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 17 Jan 2013
Copyright © CodeProject, 1999-2017
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