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
Yatish Bhavsar
NA
43
0
Passing Multiple Commadline Args. to Console app from Windows app.
Jan 28 2011 1:25 AM
Hello Friends,
I have a
Windows application which calls a Console application
and
passes 5 command line arguments to that
. I'm facing some problem to it.
the console app throughing an
exception "Insput string was not in correct format"
.
Following is code:
string cmdexePath = @"D:\SortProgram\SortProgram\Executable\TS_PD.exe";
//notice the quotes around the below string...
string myApplication = cmdexePath + " " + "D:\\SortedFile.txt D:\\FixFormat.txt "+ " " + GlobalClass.Global.DetPath + " " + MergeFields +" 10000";
//the /K keeps the CMD window open - even if your windows app closes
// string cmdArguments = String.Format("/K {0}", myApplication);
string cmdArguments = myApplication;
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(cmdexePath,cmdArguments);
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo = psi;
p.Start();
please reply it's urgent,
thanks.
Reply
Answers (
3
)
How To Check File in MOSS does exist or not from Web Application??
How do you match the value from database to user control using VB.NET