Modify Execute2
This commit is contained in:
parent
6ac1508fcb
commit
d4d3548f63
2 changed files with 9 additions and 5 deletions
|
@ -110,11 +110,9 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
//run handheldcleanup.exe
|
||||
if (File.Exists(file2))
|
||||
{
|
||||
string serverfilename = "servername.txt";
|
||||
|
||||
string arguments2 = string.Format("-u -p {0} < {1}",
|
||||
MAPIProfile,
|
||||
serverfilename);
|
||||
string arguments2 = string.Format("-u -p {0}",
|
||||
MAPIProfile);
|
||||
try
|
||||
{
|
||||
string output;
|
||||
|
|
|
@ -193,12 +193,18 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
startInfo.RedirectStandardError = true;
|
||||
startInfo.RedirectStandardOutput = true;
|
||||
startInfo.UseShellExecute = true;
|
||||
startInfo.RedirectStandardInput = true;
|
||||
startInfo.UseShellExecute = false;
|
||||
startInfo.CreateNoWindow = true;
|
||||
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
|
||||
Process proc = Process.Start(startInfo);
|
||||
|
||||
StreamWriter inputWriter = proc.StandardInput;
|
||||
inputWriter.Write(EnterpriseServer);
|
||||
inputWriter.Flush();
|
||||
inputWriter.Close();
|
||||
|
||||
if (proc == null)
|
||||
throw new ApplicationException("Proc is null.");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue