If I change name of RStudio installer to rstudio.exe, installer doesn't work

I am trying to make a script to install RStudio (free version) on some enterprise computers & to make it easy on us, I am standardizing on the name of the payload the script is calling. This way, I don't need to change the code in the script, I just change the payload that the script executes. In this case, I would be changing the downloaded "RStudio-2024.04.1-748.exe" to just "rstudio.exe".

If I do this & run the "rstudio.exe" installer, I get a message:

"RStudio is currently running. Please close it before installing a new version."

RStudio is not running.

If I rename the file back to what it was originally, then I am able to install RStudio.

Is this something that the devs can provide what I am needing? Perhaps an install flag?

I am curious why you must rename the downloaded exe into specifically rstudio.exe, the default name of the process of the RStudio IDE execution - wouldn't somethingrstudio-installer.exe be more appropriate here and avoid the issue in the first place ?

1 Like

I guess it doesn't have to be "rstudio.exe" however it shouldn't have mattered since I am using an exclusive path in the PowerShell script to run the installer.

I just renamed the "RStudio-2024.04.1-748.exe" file to "rstudioinstaller.exe" and that worked.

Appreciate the observation & advise.

1 Like

Just FYI, the windows installer for RStudio has logic that specifically checks to see if there's a process named "rstudio.exe" because updating or removing rstudio will fail if it's currently loaded. So, yes, picking any name other than "rstudio.exe" is the solution here. Here's the very ugly setup logic that does this: rstudio/package/win32/cmake/modules/NSIS.template.in at c5cdc084aec0f885f087bdae8865ed149b76fa01 · rstudio/rstudio · GitHub

1 Like