How do I launch Rgui automatically with a programme name as a parameter?

--Hi,

i try to lauch Rgui directly from a . bat file with the name of my R script as parameter such as:

"C:\R\R-4.0.3\bin\x64\Rgui.exe" --sdi --args "C:\script\main.R"

The console opens, but the programme does not run.

Any ideas ?

thank you --

I'd suggest running it via Rscript.exe instead:

"C:\R\R-4.0.3\bin\x64\Rscript.exe" "C:\script\main.R"

Please see this:

https://stackoverflow.com/questions/3412911/r-exe-rcmd-exe-rscript-exe-and-rterm-exe-whats-the-difference/3415135#3415135