![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
![]() |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
|||
|
|||
|
ProcessStart y Argumento con Espacios incluidos
Buenas tardes amigos.
Estoy intentando este código: Código:
string PathAbrir = "C:\\Archivos de Programa\\Fotos\\temporal.jpg";
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo myProcessStartInfo = new System.Diagnostics.ProcessStartInfo("C:\\WINDOWS\\system32\\mspaint.exe");
myProcessStartInfo.UseShellExecute = false;
myProcessStartInfo.Arguments = PathAbrir;
myProcess.StartInfo = myProcessStartInfo;
myProcess.Start();
myProcess.WaitForExit();
myProcess.Close();
Lo probé en una ruta directa y funciona, pero necesito hacer el ShellExecute desde C:\\Archivos de Programa. Como se puede representar la ruta "Archivos de Programa", pero para que funcione con ShellExecute algo como Archivos%20de%20Programa? Muchas Gracias! |
|
#2
|
|||
|
|||
|
Solucionado amigos Gracias
Código:
string PathAbrir = @"""C:\Archivos de Programa\Fotos\temporal.jpg""";
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo myProcessStartInfo = new System.Diagnostics.ProcessStartInfo("C:\\WINDOWS\\system32\\mspaint.exe");
myProcessStartInfo.UseShellExecute = false;
myProcessStartInfo.Arguments = PathAbrir;
myProcess.StartInfo = myProcessStartInfo;
myProcess.Start();
myProcess.WaitForExit();
myProcess.Close();
que caprichos no??? Gracias amigos |
|
#3
|
|||
|
|||
|
problema al intentar agregar comillas "
hola amigos,
en este mismo hilo, ven la necesidad de agregar comillas a un string, y lo hacen asi: Código:
@"""C:\Archivos de Programa\Fotos\temporal.jpg"""; entonces lo que pretendo hacer es concatenar en vez de .jpg un .bmp, o un tif. como se concatena algo como esto? [code]@"""C:\Archivos de Programa\Fotos\temporal+".bmp"""";[/CODE] asi me sale error, Muchas gracias! |
![]() |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| titulo con espacios | anubis | Varios | 3 | 04-05-2007 21:44:44 |
| Insertar espacios | federki | OOP | 4 | 19-11-2006 22:46:36 |
| Espacios a la derecha | Johnny Q | SQL | 3 | 11-10-2005 20:04:58 |
| Conexion ADO , argumento no valido | VRO | Conexión con bases de datos | 2 | 09-06-2005 12:06:53 |
| Quitar Espacios en Sql | El_Perrito | Firebird e Interbase | 3 | 25-02-2005 12:49:12 |
|