TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
gongdehui
NA
63
0
problem about how to invoke os format command in C#
Nov 20 2004 8:28 AM
I want to invoke the format command of OS(XP) im my C# code: string VolumeName = "UDISK"; string FormatW2K = "CMD.EXE"; string FormatW2KParam = string.Format("/C \"format.com {0}:/q/x/V:{1}\"",driverletter,VolumeName); Win32.ShellExecute((IntPtr)0,"open", FormatW2K, FormatW2KParam, string.Empty, Win32.SW_SHOW); I have got two problems: 1,the format function always compels me to click the Enter key to go on the format operation.I want to my code can do it for me.So,my program will invoke the Format command and do format operation automatically and never bother me.Then how to realize my dream? 2,When the Format command has been invoked,my program automatically perform the following code no matter if the format operation finished or not.But I hope that the following code should be perform as long as the format operation finished.So,how to settle this problem? Thanks!
Reply
Answers (
1
)
Dates
Associating a query with Crystal Reports and setting params at runtime