at the moment i made my peace with lacking functions in rust on windows (windows yeah uses bytecompiled filetype like .lnk and linux uses text and mimetypes). I have all my problems solved allready with powershell scripts for years ago and now i have something:
let process = Command ::new("powershell.exe") .args(&["-NoProfile","-ExecutionPolicy","ByPass","-File","MakeLnk.ps1","-lnk_path","fooBar1.lnk"]) .output() .expect("failed to execute process");
Yeah functioned but that is a little embarrassing to me . No i want following, i want capsule all powershell scripting in the executable.
I know rust has the ability with include/_str/_bytes but how can i push the string from an include_str or so give to an std::Command that the handle this reference to an include like an script-file?
So that all is capsuled in an exe and the user gets nothing from the call with?