I try to use LetsEncrypt Certificates , it’s works and with this command I able to provide LetsEncrypt.
string command= String.Format(staging + "-a -j -d {0} -p {1} {2}", "domain.com", certPassword, options);
Process p = Helpers.LaunchProcess(@"acme.net\acme.exe", command,
stdout => this.Invoke(() => tbLog.AppendText(stdout + CRLF)),
stderr => this.Invoke(() => tbLog.AppendText(stderr + CRLF)));
On Command Prompt we have a command like “cd c:\domain1” to change Root Directory in DOS, is there any thing like this to change Root of acme.exe?
I asking for such a thing because for now, I should to copy my .exe file to Root of each domain.
Code of LaunchProcess:
public static Process LaunchProcess(string processName, string arguments, Action<string> onOutput, Action<string> onError = null)
{
Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.FileName = processName;
p.StartInfo.Arguments = arguments;
p.StartInfo.CreateNoWindow = true;
p.OutputDataReceived += (sndr, args) => { if (args.Data != null) onOutput(args.Data); };
if (onError != null)
{
p.ErrorDataReceived += (sndr, args) => { if (args.Data != null) onError(args.Data); };
}
p.Start();
// Interestingly, this has to be called after Start().
p.EnableRaisingEvents = true;
p.BeginOutputReadLine();
p.BeginErrorReadLine();
return p;
}