C
C#3mo ago
João Paul

✅ Running cmd line command via c# not working

Hello everyone. I have the following code: kioskProcess = new Process { StartInfo = { FileName = "cmd.exe", WorkingDirectory = Constants.KioskPath, Arguments = @"npm start", UseShellExecute = false, } }; kioskProcess.Start(); If I run this, the command line opens and goes to the working directory correctly but never runs the "npm start". Am I doing something really stupid here?
3 Replies
WEIRD FLEX
WEIRD FLEX3mo ago
i remember that you should have to use an argument to execute a command in cmd, something like /k or /c use cmd /help to look at the switches
João Paul
João Paul3mo ago
the /k worked. Thanks a lot 😄
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View