I have below code in new.R file, which is working fine in RStudio interactive mode.
system_command <- paste("WScript", " C:/Users/OneDrive/Desktop/r1.vbs")
system(command = system_command)
But when I run the new.R file using Rscript, its not invoking the vbs script. Is there any other way to invoke vbs script in Rscript mode?
I had a similar problem with system2() wenn i wanted to start a new Rscript-process in the background. R version 4.3.0 Windows 10 Programm works in RStudio, but not in Powershell: in Powershell no background process is started. I added short slepp time in programm. This help.