I have try to run "npm init" command from the c# console app, using this code:
private void Execute(string command, string arg)
{
Process p = new Process();
p.StartInfo.FileName = command;
p.StartInfo.Arguments = arg;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.WorkingDirectory = @"E:\Work\";
p.Start();
p.WaitForExit();
}
Execute(@"C:\Program Files\nodejs\npm.cmd", "init");
But nothing happening. I getting only 2 empty lines after the running my app. Please, help to resolve this problem.