Click here to Skip to main content
15,897,150 members
Home / Discussions / C#
   

C#

 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
Don Dang18-Sep-07 11:50
Don Dang18-Sep-07 11:50 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
PIEBALDconsult18-Sep-07 13:35
mvePIEBALDconsult18-Sep-07 13:35 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
Dave Kreskowiak18-Sep-07 14:08
mveDave Kreskowiak18-Sep-07 14:08 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
PIEBALDconsult18-Sep-07 15:01
mvePIEBALDconsult18-Sep-07 15:01 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
Dave Kreskowiak18-Sep-07 16:16
mveDave Kreskowiak18-Sep-07 16:16 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
PIEBALDconsult18-Sep-07 16:31
mvePIEBALDconsult18-Sep-07 16:31 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
Dave Kreskowiak18-Sep-07 17:20
mveDave Kreskowiak18-Sep-07 17:20 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
Don Dang19-Sep-07 9:39
Don Dang19-Sep-07 9:39 
Dave,
I took out the colon: in the UNC path. I have included the path and directory in the System.Diagnostics.Process.Start(). I am getting a new error when I try this: "No process is associated with this object." I physically went to the directory and execute the HSMDiskStatus.exe w/o any problem. How do I know whether my code connected to the remote machine or it's looking in my local machine for the HSMDiskStatus.exe?

Here is my code:
string password = "password";
Process proc = new Process();

proc.StartInfo.Domain = servername;
proc.StartInfo.FileName = "HSMDiskStatus.exe";
proc.StartInfo.UserName = @"domain\user";

System.Security.SecureString secret = new System.Security.SecureString();
foreach (char c in password)
{
secret.AppendChar(c);
}

proc.StartInfo.UseShellExecute = false;
proc.StartInfo.Password = secret;
System.Diagnostics.Process.Start(@"\\" + servername + @"\E$\datacenter\HSMDiskStatus.exe ", @"/F E:\DPSanChart\" + servername + ".txt");

while (!proc.HasExited)
{
proc.Refresh();
}
proc.Close();

GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
Dave Kreskowiak19-Sep-07 11:58
mveDave Kreskowiak19-Sep-07 11:58 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
Don Dang19-Sep-07 12:27
Don Dang19-Sep-07 12:27 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
Dave Kreskowiak19-Sep-07 15:16
mveDave Kreskowiak19-Sep-07 15:16 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
PIEBALDconsult19-Sep-07 17:52
mvePIEBALDconsult19-Sep-07 17:52 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
Dave Kreskowiak20-Sep-07 1:56
mveDave Kreskowiak20-Sep-07 1:56 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
Don Dang19-Sep-07 9:11
Don Dang19-Sep-07 9:11 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
Don Dang19-Sep-07 9:20
Don Dang19-Sep-07 9:20 
AnswerRe: Execute a remote .exe file with switches using Proccess class Pin
ChrisKo18-Sep-07 11:19
ChrisKo18-Sep-07 11:19 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
Don Dang18-Sep-07 11:58
Don Dang18-Sep-07 11:58 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
ChrisKo18-Sep-07 12:26
ChrisKo18-Sep-07 12:26 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
Don Dang18-Sep-07 12:36
Don Dang18-Sep-07 12:36 
GeneralRe: Execute a remote .exe file with switches using Proccess class Pin
ChrisKo18-Sep-07 13:46
ChrisKo18-Sep-07 13:46 
AnswerRe: Execute a remote .exe file with switches using Proccess class Pin
PIEBALDconsult19-Sep-07 13:32
mvePIEBALDconsult19-Sep-07 13:32 
GeneralRegular Expressions [modified] Pin
#realJSOP18-Sep-07 10:27
professional#realJSOP18-Sep-07 10:27 
GeneralRe: Regular Expressions Pin
Jonathan [Darka]18-Sep-07 10:30
professionalJonathan [Darka]18-Sep-07 10:30 
GeneralRe: Regular Expressions Pin
#realJSOP18-Sep-07 10:36
professional#realJSOP18-Sep-07 10:36 
GeneralRe: Regular Expressions Pin
Jonathan [Darka]18-Sep-07 10:53
professionalJonathan [Darka]18-Sep-07 10:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.