psexec and gacutil no standard output

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi,
I am trying to gac on a remote machine. The code below works fine (ie the dll is gaced on the remote machine) but there is no standard or error output apart from the string
"Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.30729.1"
If I run it from a cmd prompt I see the complete output!
Process p = new Process();<br/>
p.StartInfo = new ProcessStartInfo(@"C:PsExec", string.Format("\\{0} cmd /K gacutil /i \\share\{1} /f", servername, filename))<br/>
{<br/>
<br/>
RedirectStandardOutput = true,<br/>
RedirectStandardError = true,<br/>
UseShellExecute = false,<br/>
CreateNoWindow = true<br/>
};<br/>
<br/>
p.Start();<br/>
p.WaitForExit(30000);<br/>
if (!p.HasExited)<br/>
{<br/>
p.Kill();<br/>
}<br/>
output += p.StandardOutput.ReadToEnd();<br/>
string error = p.StandardError.ReadToEnd();<br/>
p.Close();
I have also triedwith the same results<br/>

p.StartInfo = new ProcessStartInfo(@"C:PsExec", string.Format("\\{0} gacutil /i \\share\{1} /f", servername, filename))
I need to find out whether the operation (GAC) succeeded or failed. Any one got any ideas? <hr class="sig Biztalk Developer

View the full article
 
Back
Top