Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using ImDisk for a 250MB RAM drive, with the TEMP environment variable, speeds up our Windows XP systems a lot - probably because the NTFS write-through latency when creating new files is avoided, or maybe just because it reduces disk activity, so that other disk operations don't get interrupted by seeks.

However, I haven't found a way to make ImDisk re-create the temp drive and format it at boot time. How can I make ImDisk or another similar tool create a ram drive in virtual memory at boot time, and have it formattet?

share|improve this question
up vote 2 down vote accepted

I found a solution myself. This will create a 100MByte P: drive and format it:

c:\windows\system32\imdisk -a -t vm -s 100M -p "/fs:ntfs /q /y" -m P:

Put this into C:\WINDOWS\System32\GroupPolicy\Machine\Scripts\Startup\ramdisk.cmd

Then: "Start" "Run" type gpedit.msc Under "Computer Configuration" "Windows Settings" Double click "Scripts(Startup/Shutdown)" Double click "Startup" in right pane. Click "Add" button and pick ramdisk.cmd and then click "ok" then Click "Ok" again. you can now exit out of all the Group Policy editor..

Now when Windows XP Pro boots up, before the user logs on, the ram disk will be present.

share|improve this answer
I can confirm that this works excellent on Windows Server 2008 R2 as well. – MattBianco May 20 '14 at 11:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.