Ever developed an application that at a client's site required a specific drive letter, or you don't want to be editing an application's configuration file all the time (and accidently 'releasing' the development version)? Although you can personally map a drive letter to a share for use in Windows applications, an ASP.NET application or a Windows service won't have access to your drive letters as they do not run in your user session. What you need is a new volume at a system level available to all users.
At first I used a compact flash card, assigning the driver letter as required, but then I found a great free utility on the Microsoft site for creating a ramdrive under Windows 2000 (that works under Windows XP Professional too). OK, it starts up with no files on it, but you could always run a batch file to load up files, especially for test scenarios. The knowledge base article can be found at http://support.microsoft.com/default.aspx?scid=kb;en-us;Q257405&SD=MSKB
I created a handy readme.txt that I saved with the driver that lists the common steps for installation;
1. Install the software as a new hardware device (Add New Hardware) using the advanced install wizard to point to the .inf
2. Change these registry keys (DiskSize is for a 32Mb drive)
HKLM\SYSTEM\CurrentControlSet\Services\Ramdisk\Parameters, DiskSize change to 01F00000 (32505856)
HKLM\SYSTEM\CurrentControlSet\Services\Ramdisk\DriveLetter, DriveLetter from Z: to your chosen drive letter
HKLM\SYSTEM\CurrentControlSet\Services\Fastfat\Start, Start change from 4(disabled) to 1(system)
I've found it perfectly stable in day to day use, and was the ideal solution for my ASP.NET and Windows services which required access to an M: drive.
| posted on Monday, November 21, 2005 12:13 PM