First I would like to thank Olof Lagerkvist for the ImDisk Virtual Disk Driver and v77 for the ToolKit both of which I use extensively.
For the creation of quick ad-hoc NTFS formated RAMDisks I have created the following batch script that may be also useful to others. Read the help text and source for a complete description. I have only tested it on Windows 8 Enterprise 64-bit but it should work on any Windows 7 and Windows 8 system.
A ImDisk wrapper batch to mount/unmount ad-hoc NTFS formatted RAMDisks in the
first available drive letter.
The program automatically detects privilege status and prompts user to elevate
it if needed. It also prompts for desired RAMDisk size in GB units (fraction
inputs are allowed. For example type "0.5" when prompted for size to create
a 500MB RAMDisk).
RAMDISK [-m | -u | -d] /?
-m Mounts a NTFS formatted RAMDisk on the first free drive letter.
-u Unmounts last registered RAMDisk in the RAMDisk register file.
-d Deletes the RAMDisk register file.
-? Displays this help message.
The RAMDisk register file is stored on TEMP and works as a LIFO stack. Each
time the program is invoked with the -m switch a RAMDisk is created, mounted
and its drive letter is registered in the RAMDisk register file. Invoking the
program with the -u switch initiates a search for the last entry in the
RAMDisk register file and unmounts the RAMDisk corresponding to it and then
updates the RAMDisk register file accordingly.
The -d switch is provided because failure to properly unmount with the -u
switch mounted RAMDisks that were created with the -m switch will result in a
RAMDisk register file in an unsynchronized state. This most often occurs when
an user shutdowns the system before unmounting all ad-hoc RAMDisks (a frequent
occurrence due to the non persistent nature of such RAMDisks) or in the case of
unexpected system shutdown or in the case a mounted RAMDisk that was created
with the -m switch is unmounted via other methods (such as the IMDisk Toolkit's
RamDisk Configuration Tool).
As such it is recommended to include an entry in the system Task Scheduler to
run the program with the -d switch on system startup if TEMP resides in a
The recommended usage is to create two shortcuts. One invoking "RAMdisk -m" and
the other invoking "RAMdisk -u". Thus every time the first shortcut is launched
a new ad-hoc RAMDisk is created (after prompting user for privilege status and
size) and every time the second shortcut is launched the last created ad-hoc
RAMDisk is destroyed (again after prompting user for privilege status).
Edited by LtPinback, 13 October 2013 - 02:26 PM.