Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: deleted broken link


  1. Create an empty text file and name it, for example

    Code Block

    . Paste the following commands into the file:

    Code Block
    imdisk.exe \-a \-s %1 \-m R: \-p "/fs:NTFS /q /y"
    label R: Timeshift
  2. Start

    Code Block

    and navigate to Computer Configuration\Windows Settings\Scripts (Startup/Shutdown)\Startup. Add the batch file to the Script Name field and type a drive size in the Script Parameters field, for example

    to create a 8 GB RAM drive.
    If you want to setup the automatic startup in a batch file (e.g. as part of an unattended installation) instead of interactively, it is easier to use a scheduled task instead of a group policy.  Here is a command line to set up a scheduled task based on the batch file above:

    Code Block
    schtasks.exe /create /TN CreateRAMdrive /tr "<location of batch file>\CreateRAMdrive.bat <size of RAMdrive>" /sc ONSTART /ru "System"

    The command line must be executed with administrative privileges. If you cut and paste from above, remove any line breaks from the result.
    See The easy - and free - way to create and use a RAMdisk for a step-by-step description of how to generate a RAM drive at boot using IMdisk.


    Putting your internet, and other application's, cache files on the RAM drive is generally a good idea, however, assigning the Windows TEMP and TMP variables to a RAM drive can cause problems, despite the "answer" in this thread. Here are some discussions of the pitfalls: