Anti virus quarantine files when installing Packages

Hello everyone,

I have done some searching around the forum and I just have not found the posts that I am looking for.
Issue: We are running thelatest R and RStudio in a corporate environment and have run into issue with our AV, Cylance, where it will quarantine files during the Package install process. I have tried to allow these hashes to be run, but the hashes change for each and every computer. Since they do not live in a friendly location (below) I am really struggling with getting this working for our staff.

I know I can change the installation directory, but if I could also change the temporary download location that could help too. Does anyone know where the configuration lives?
This site looked like it may be down the right path, but not really: potential solution for when anti-virus prevents moving a temporary installation


  • C:\Users<USER>\AppData\Local\Temp\RtmpiYHlpO\downloaded_packages\|askpass/win-askpass32.exe
  • C:\Users<USER>\Documents\R\win-library\4.0\askpass\win-askpass32.exe


  • C:\Users<USER>\AppData\Local\Temp\RtmpiYHlpO\downloaded_packages\|processx/bin/i386/supervisor.exe
  • C:\Users<USER>\Documents\R\win-library\4.0\processx\bin\i386\supervisor.exe


  • C:\Users<USER>\AppData\Local\Temp\RtmpiYHlpO\downloaded_packages\|processx/bin/i386/interrupt.exe
  • C:\Users<USER>\Documents\R\win-library\4.0\processx\bin\i386\interrupt.exe

Any help would be greatly appreciated.

As I continue to read, I am wondering if this is more of an R issue, than RStudio... Still not sure, as I am unaware who controls the package installation process? just saw this article: Differentiating R from RStudio

The root path to the temporary folder location is determined by your OS, I'm guessing this is Windows in your case ? see the second temp folder type, the one which is per user.
R provides a tempdir() function that makes a random available sub directory in thatyemp directory.

I wonder whether switching to using renv package would help. If you have a shared drive that could serve as a common cache for installed packages you could perhaps set things up where each user when using renv::install would first check for the desired package in the renv cache rather than the CRAN sites.

Thank you for a reply, sorry I was so slow at getting back to you... I was expecting an email notification that I did not ever see.

I do not think changing the Temporary folder on the OS, yes Windows for me, would help. That would change it for all other apps and basically make that folder location just as much of a liability as the regular temp folder.

I will give this "renv" option a try, I think that seems like it could work. But if it still somehow compiles the libraries and executables in some individual/unique way it will just be the same problem a different way.

Thanks for the heads up, we will see how it works out.

I gave this a try and it did not seem to work. When I tried to change the cache directory it just created links to the normal folder, so it does not allow the ability to allow specific folders correctly.