Yes, I had try the command line using netsh and ipsec and it work perfectly.
from command prompt
WORK:
----------------
c:\netsh
netsh>ipsec static <do all generated policy here>
NOT WORK:
-------------
c:\netsh ipsec static <do all generated policy here>
in my C# I initial m_proc.StartInfo.FileName = "netsh"; and every time I
called an ipsec command it just add the argument to "netsh" command and it
become "netsh ipsec static <do all generated policy here>"
Is there a way I can do a command line like
netsh>ipsec static <do all generated policy here>
netsh>ipsec static <do policy 2>
netsh>ipsec static <do policy3>
netsh>.....
thanks
"Jani Järvinen [MVP]" wrote:
Hello,
I'm using c# to called a command line netsh ipsec static....
my question is how do I keep the command line is in the netsh eviroment?
Unfortunately, to me your question isn't completely clear, what do you mean
by saying you want to keep the command line in the netsh environment?
Also, your problem probably isn't C# related. Have you tried executing netsh
directly (interactively) on the command line? Does it work then? If not,
then it isn't a C# problem but instead a netsh and/or environment issue.
Hope this helps.
--
Regards,
Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/