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
|
//run handheldcleanup.exe
|
||||||
if (File.Exists(file2))
|
if (File.Exists(file2))
|
||||||
{
|
{
|
||||||
string serverfilename = "servername.txt";
|
|
||||||
|
|
||||||
string arguments2 = string.Format("-u -p {0} < {1}",
|
string arguments2 = string.Format("-u -p {0}",
|
||||||
MAPIProfile,
|
MAPIProfile);
|
||||||
serverfilename);
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string output;
|
string output;
|
||||||
|
|
|
@ -193,12 +193,18 @@ namespace WebsitePanel.Providers.HostedSolution
|
||||||
|
|
||||||
startInfo.RedirectStandardError = true;
|
startInfo.RedirectStandardError = true;
|
||||||
startInfo.RedirectStandardOutput = true;
|
startInfo.RedirectStandardOutput = true;
|
||||||
startInfo.UseShellExecute = true;
|
startInfo.RedirectStandardInput = true;
|
||||||
|
startInfo.UseShellExecute = false;
|
||||||
startInfo.CreateNoWindow = true;
|
startInfo.CreateNoWindow = true;
|
||||||
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||||
|
|
||||||
Process proc = Process.Start(startInfo);
|
Process proc = Process.Start(startInfo);
|
||||||
|
|
||||||
|
StreamWriter inputWriter = proc.StandardInput;
|
||||||
|
inputWriter.Write(EnterpriseServer);
|
||||||
|
inputWriter.Flush();
|
||||||
|
inputWriter.Close();
|
||||||
|
|
||||||
if (proc == null)
|
if (proc == null)
|
||||||
throw new ApplicationException("Proc is null.");
|
throw new ApplicationException("Proc is null.");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue