Redirecting TMP/TEMP to a volatile RAM disk

Started by Dina


Redirecting TMP/TEMP to a volatile RAM disk   20 November 2023, 11:11

Hi, I've just been reading your suggestions re scenarios for using a RAM disk and the idea of using one for the system Temp folder seems like a very good one (for reducing SSD drive wear) but I see one potential (if infrequent) problem with that, perhaps...

Some program installations require a system reboot to finish the installation process (usually because a new service needs to be started or a driver replaced, or something of that nature).

In such cases, the installer often leaves files in the Temp folder which will be used to complete the post-reboot installation.

So my question is this: if I am using a volatile RAM disk for the Temp folder, will ALL the contents of the Temp folder be lost at each reboot, or will some files survive (e.g. non-OS related files, such as those involved in an ongoing installation)?

If all volatile RAM disk contents ARE lost during a reboot, is it possible to TEMPORARILY convert a volatile RAM disk to a persistent one, when one is about to perform a program installation of the type that requires a reboot as described above?

This might seem like a stupid question, because I know that RAM contents are lost when powering off a computer (although I have read of advanced forensics software that claims to be able to recover RAM contents, even after a computer has been powered off) but I ask because I am assuming that power to the RAM is not actually lost during a reboot.
SoftPerfect Support forum - Andrew avatar image

Re: Redirecting TMP/TEMP to a volatile RAM disk   20 November 2023, 11:12

You are correct in noting that some program installations necessitate a system reboot, often leaving files in the Temp folder to complete the post-reboot installation process. In the case of a volatile RAM disk, it is important to understand that all contents within this disk are indeed lost upon rebooting. This is an inherent characteristic of volatile RAM disks, and as you mentioned, while there are advanced forensic methods to recover RAM contents, these are highly specialised techniques and are not applicable in regular software operations.

Regarding your question about temporarily converting a volatile RAM disk into a persistent one for installations requiring reboots, this isn't a feature supported by our RAM disk software. However, your concern brings us to an important distinction in Windows environment variables.

In Windows, there are two types of TMP/TEMP environment variables: per-user and system-wide:
  • User variables are generally used for temporary files and can safely be redirected to a volatile RAM disk. We have implemented this setup on several computers without encountering issues with software installations.
  • System variables, typically located at %SYSTEMROOT%\Temp, are more often used by system services and software installers. Software installers prefer the system temporary directory to ensure availability of necessary files across different user sessions.

Therefore, we recommend configuring the user TMP/TEMP variables to use the volatile RAM disk. This is beneficial for regular applications that frequently utilise these directories for temporary file storage. However, we advise against redirecting system-level temporary folders to the volatile RAM disk, as these are not as frequently used, and software installers might require files from these locations to be available after a reboot.

I hope this clarifies your concerns.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.




A brief and informative title for your message, approximately 4–8 words:


Spam prevention: please enter the following code in the input field below.

  ******   **     **  **     **  **     **  **    ** 
 **    **  ***   ***  **     **  **     **  **   **  
 **        **** ****  **     **  **     **  **  **   
 **        ** *** **  **     **  **     **  *****    
 **        **     **   **   **   **     **  **  **   
 **    **  **     **    ** **    **     **  **   **  
  ******   **     **     ***      *******   **    **