I've been trying to make a software that uses a cmd(command prompt) command. I don't know how I could, so I need some help. I want to know how can I run a cmd command in a form application?
Thank you in advance to anyone who helps me :)
Printable View
I've been trying to make a software that uses a cmd(command prompt) command. I don't know how I could, so I need some help. I want to know how can I run a cmd command in a form application?
Thank you in advance to anyone who helps me :)
You can either use Process.Start or Shell function.
For example:
Shell("msg * Hello")
My program is simple. I have a text box it is to select a drive. And then I have a button this button is to start the progress.
My cmd command is:
Also the command works in only administrator cmd.Code:drive letter ( eg: G: ) ATTRIB -H -S -A *.* /S /D
Thanks for your help.
Can you give me an example of using process.start.
here's a process.start example:
http://msdn.microsoft.com/en-us/libr...v=vs.110).aspx
the process' startinfo property has a verb property that you can set to "runas" for administrator privileges...