First of all, CACLS reports itself as deprecated, ICACLS is recommended instead.
Please see:
http://technet.microsoft.com/en-us/library/cc753525%28WS.10%29.aspx[
^].
If a console application requires a user input, on command line it is simulated using the input pipe "<", such as
someApplication.exe /param1 /param2:value < userinput
In the code of you .NET application, you can do it by redirecting of the input stream
System.Diagnostics.Process.StandardInput
using
System.Diagnostics.Process.Start
. You can also redirect
StandardOutput
and
StandardError
strings.
Please see the sample code with input redirection:
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.standardinput.aspx[
^].
See also
http://msdn.microsoft.com/en-us/library/system.marshalbyrefobject.aspx[
^].
—SA