hello all,
I want to call an exe(IISWeb.vbs) to create a site in Sharepoint.While
calling that exe through Process.Start() it throws the following
exception.
1.while calling through webService ,it throws the exception "ACCESS
DENIED".
2.While calling through console Application,it throws
"%1 is not a valid Win32 application"
The code i used for that is
ExecuteExeFile(string exeFilePath, string arguments)
{
try
{
Process ps = new Process();
ps.StartInfo.FileName = exeFilePath;
ps.StartInfo.UseShellExecute = false;
ps.StartInfo.Arguments = arguments;
ps.StartInfo.CreateNoWindow = true;
ps.StartInfo.RedirectStandardInput = true;
ps.StartInfo.RedirectStandardOutput = true;
ps.Start();
StreamReader MyStreamReader = ps.StandardOutput;
retStr = MyStreamReader.ReadToEnd();
ps.WaitForExit();
}
catch (Exception e)
{
retStr = "Error";
WriteLog("ExecuteExe :"+e.Message);
}
}
Is there any mistakes in this...
Any solutions............
thanks in advance
KARTHICK.K
Mail :: ka**********@gmail.com