The rust std::process::Command; structure take in a Command::new(program), where program is the path to the program to be executed as shown in the example below.
let output = if cfg!(target_os = "windows") {
Command::new("cmd")
.args(&["/C", "echo hello"])
.output()
.expect("failed to execute process")
Is it possible to create a new process on windows in rust to run a function?