I'm stuck while creating an application whose abstract work is to copy some file from host machine to network machines shared folder,
I'm doing something like this in c#
C#
string lscmd = "robocopy "+ lsCurentWorkingDirectory+ " \\\\CPU219\\Test$ " + lsFileName;
ProcessStartInfo ProcessInfo;
ProcessInfo = new ProcessStartInfo("cmd.exe", "/c " + lcmd);
ProcessInfo.CreateNoWindow = true;
ProcessInfo.UseShellExecute = False;
process = Precess.Start(ProcessInfo);
process = Precess.Start(ProcessInfo);
ProcessInfo.CreateNoWindow = true;
ProcessInfo.UseShellExecute = False;
process = Precess.Start(ProcessInfo);
process.waitforExit();When I'm runing this code through windows services its get stuck at process.WaitforExit(), and when I'm running this by normal console application, it works well.
plz help me

VulpesRank #55 · 29.2K reputationPosted Nov 11, 2014, 4:51 AM EST
waqar ahmed imamuddin5 reputationPosted Nov 11, 2014, 6:38 PM EST
VulpesRank #55 · 29.2K reputationPosted Nov 12, 2014, 1:10 AM EST
waqar ahmed imamuddin5 reputationPosted Nov 12, 2014, 7:32 PM EST
VulpesRank #55 · 29.2K reputationPosted Nov 13, 2014, 4:16 AM EST