Skip to content

Instantly share code, notes, and snippets.

@yareally
Last active December 20, 2015 21:39
Show Gist options
  • Save yareally/6199239 to your computer and use it in GitHub Desktop.
Save yareally/6199239 to your computer and use it in GitHub Desktop.
initialize ram drive
:: Guides and examples can be found at:
:: http://forums.guru3d.com/showthread.php?t=356046
:: Script needs to be set as a system startup batch file (with event schedular, not the "startup directory") with the highest priority and system privilages to work correctly.
:: Init the ramdrive (12GB) in physical memory and format it as ntfs
imdisk -a -s 12G -m R: -p "/fs:ntfs /q /y" -o awe
:: add a page file starting with 96MB and expands to 1536M
swapadd R:\pagefile.sys 96M 1536M
:: make some directories
mkdir r:\temp
mkdir r:\cache\opera
mkdir r:\cache\firefox
mkdir r:\cache\chromium
mkdir r:\downloads
mkdir r:\downloads\temp_downloads
mkdir r:\stuff
:: label drive under My Computer
label r: Ramdrive
@yareally
Copy link
Author

Script can be modded at any time, but changes don't take place until next reboot (dont try running it again after the ramdrive has been created and the PC has started up).

Also, if anyone adds a page file, remember to move it under system in control panel (as well as temp directories).

swapadd is another small utility made by the same guy that does imdisk. It can be found on the same site (same page I think actually).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment