C
C#9mo 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
Omnissiah
Omnissiah9mo 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 PaulOP9mo ago
the /k worked. Thanks a lot 😄
Unknown User
Unknown User9mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server