PDA

View Full Version : معادل Shell در C#



amir_3530
جمعه 27 آبان 1384, 02:16 صبح
سلام
معادل دستور Shell در VB.NET برای کار با دستورات تحت داس در سی شارپ چه دستوری است
ممنون.

محمد میرمصطفی
جمعه 27 آبان 1384, 03:29 صبح
publicstaticProcess System.Diagnostics.Process.Start(string fileName);

ARA
شنبه 28 آبان 1384, 06:30 صبح
برای کار با دستور command اگه منظورتون باشه
WinExec ( string lpCmdLine, uint nCmdShow);///dll

amir_3530
یک شنبه 29 آبان 1384, 01:09 صبح
میشه یک مثال بزنید مثلا من می خواهم وقتی روی Button در فرمم کلیک کردم درایو فرمت شود
ممنون از شما.

Mehdi Tahmasebi
شنبه 26 فروردین 1391, 01:31 صبح
دستور زیر برای کپی کردنه


System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("cmd");

// Redirect both streams so we can write/read them.
psi.RedirectStandardInput = true;
psi.RedirectStandardOutput = true;
psi.UseShellExecute = false;


// Issue the dir command.
p.StandardInput.WriteLine(@"copy c:\a.txt c:\b.txt");