Reputation: 77
I want to run a command process with C# and see the version of NodeJS
using (Process process = Process.Start(new ProcessStartInfo()
{
FileName="cmd.exe",
Arguments = "node -v"
}))
{
process.WaitForExit();
}
but I only see a command prompt without NodeJS version, any idea? thanks
Upvotes: 0
Views: 93
Reputation: 1
This is working for me.
using (Process process = Process.Start(new ProcessStartInfo()
{
FileName = "cmd.exe",
Arguments = "/C node -v",
}))
{
process.WaitForExit();
}
Upvotes: 1