Click here to Skip to main content
15,916,702 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Programming language Pin
Luc Pattyn22-Feb-10 13:00
sitebuilderLuc Pattyn22-Feb-10 13:00 
GeneralRe: Programming language Pin
neothematrix22-Feb-10 13:11
neothematrix22-Feb-10 13:11 
GeneralRe: Programming language Pin
kilkfoe123-Feb-10 8:51
kilkfoe123-Feb-10 8:51 
Question.Net remoting: Reactivating proxy object Pin
kilkfoe122-Feb-10 8:08
kilkfoe122-Feb-10 8:08 
QuestionMake Pen drive password protected. Pin
Gagan.2022-Feb-10 5:03
Gagan.2022-Feb-10 5:03 
AnswerRe: Make Pen drive password protected. Pin
Dave Kreskowiak22-Feb-10 6:22
mveDave Kreskowiak22-Feb-10 6:22 
AnswerRe: Make Pen drive password protected. Pin
Steven J Jowett23-Feb-10 3:24
Steven J Jowett23-Feb-10 3:24 
QuestionError while executing cmd command through vb.net Pin
Gagan.2022-Feb-10 4:00
Gagan.2022-Feb-10 4:00 
Hi all.

I am trying to format my pen drive by creating a process of command prompt and using "format" command (without quotes) in vb.net.

The code I am using is below :

Try
                Dim pr As New Process
                With pr.StartInfo
                    .FileName = "cmd.exe"
                    .RedirectStandardInput = True
                    .RedirectStandardOutput = True
                    .UseShellExecute = False
                    .WindowStyle = ProcessWindowStyle.Normal
                End With
                pr.Start()
                pr.StandardInput.WriteLine("format G:" & Convert.ToCha(13)) 'enter to take the pen drive.
pr.StandardInput.WriteLine("{ENTER}") 'next enter to start the formatting process.
        catch ex as exception
msgbox(ex.message)
end try

Here my pen drive's drive is G: drive which I want to format.

This code starts the formatting process but it is not formatting the pen drive and also the command prompt window remain open always.

Suggest me what should I do to format my pen drive using vb.net code.

Thanks.

Gagan
AnswerRe: Error while executing cmd command through vb.net Pin
Richard MacCutchan22-Feb-10 4:38
mveRichard MacCutchan22-Feb-10 4:38 
GeneralRe: Error while executing cmd command through vb.net Pin
Gagan.2022-Feb-10 4:52
Gagan.2022-Feb-10 4:52 
GeneralRe: Error while executing cmd command through vb.net Pin
Richard MacCutchan22-Feb-10 5:28
mveRichard MacCutchan22-Feb-10 5:28 
AnswerRe: Error while executing cmd command through vb.net Pin
Dave Kreskowiak22-Feb-10 6:24
mveDave Kreskowiak22-Feb-10 6:24 
GeneralRe: Error while executing cmd command through vb.net Pin
Gagan.204-Mar-10 4:11
Gagan.204-Mar-10 4:11 
GeneralRe: Error while executing cmd command through vb.net Pin
Dave Kreskowiak4-Mar-10 13:00
mveDave Kreskowiak4-Mar-10 13:00 
QuestionLineShape control not moving freely with cursor Pin
for120622-Feb-10 0:05
for120622-Feb-10 0:05 
AnswerRe: LineShape control not moving freely with cursor Pin
Dave Kreskowiak22-Feb-10 3:26
mveDave Kreskowiak22-Feb-10 3:26 
GeneralRe: LineShape control not moving freely with cursor Pin
for120622-Feb-10 17:09
for120622-Feb-10 17:09 
GeneralRe: LineShape control not moving freely with cursor Pin
Dave Kreskowiak22-Feb-10 17:42
mveDave Kreskowiak22-Feb-10 17:42 
GeneralRe: LineShape control not moving freely with cursor [modified] Pin
for120622-Feb-10 19:02
for120622-Feb-10 19:02 
GeneralRe: LineShape control not moving freely with cursor Pin
Dave Kreskowiak23-Feb-10 1:10
mveDave Kreskowiak23-Feb-10 1:10 
GeneralRe: LineShape control not moving freely with cursor Pin
for120623-Feb-10 1:17
for120623-Feb-10 1:17 
QuestionUsing "LIKE" Pin
EvanSaunders21-Feb-10 21:12
EvanSaunders21-Feb-10 21:12 
AnswerRe: Using "LIKE" Pin
Wayne Gaylard21-Feb-10 21:30
professionalWayne Gaylard21-Feb-10 21:30 
GeneralRe: Using "LIKE" Pin
EvanSaunders21-Feb-10 21:39
EvanSaunders21-Feb-10 21:39 
GeneralRe: Using "LIKE" Pin
JustWorking21-Feb-10 21:46
JustWorking21-Feb-10 21:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.