Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
App. WinForms / WPF .NET
Lanciare un file (script) con WinForm c#
giovedì 04 dicembre 2008 - 13.41
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
falk83
Profilo
| Newbie
22
messaggi | Data Invio:
gio 4 dic 2008 - 13:41
Ciao a tutti,
dovrei lanciare un file .vs da una WinForm, ho trovato il seguente codice ma funziona solo con .exe:
Process p = new Process();
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.UseShellExecute = false;
p.StartInfo.FileName = "prg.exe";
p.StartInfo.Arguments = "parametro1 parametro2";
p.Start();
Response.Write(p.StandardOutput.ReadToEnd());
p.WaitForExit();
Chi mi sa aiutare?
Grazie!
aiedail92
Profilo
| Expert
993
messaggi | Data Invio:
gio 4 dic 2008 - 14:28
Ciao
Se non ti serve il redirect del flusso di output, rimuovi le righe
p.StartInfo.RedirectStandardOutput = true; p.StartInfo.UseShellExecute = false;
e dovrebbe andare con qualsiasi file.
Luca
falk83
Profilo
| Newbie
22
messaggi | Data Invio:
gio 11 dic 2008 - 14:44
Perfetto grazie!
Torna su
Stanze Forum
Elenco Threads
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?
Dopo esserti registrato potrai chiedere
aiuto sul nostro
Forum
oppure aiutare gli altri
Consulta le
Stanze
disponibili.
Registrati ora !