Updates - the startup and shutdown scripts are mostly done.
As mentioned, I used the Group Policy Editor available in XP Pro (gpedit.msc) to set them up. They get run automatically as part of Windows startup and shutdown process.
The startup script looks like this:
Code:
@echo off
:; ldramdsk.bat - Populate ramdisk (Z:) on Windows startup
:; check if ramdisk already populated and skip to end if so
if exist Z:\RD_Made goto End
z:
f:\console\dos\unzip d:\mozilla\profiles\firefox\4.0\minefield.zip
f:\console\dos\unzip d:\mozilla\profiles\firefox\4.0\standard.zip
echo. > z:\RD_Made
:End
and the shutdown script looks like this:
Code:
@echo off
:; stramdsk.bat - Save ramdisk contents to HD on shutdown
f:\console\dos\zip -1 -r d:\mozilla\profiles\firefox\4.0\minefield.zip z:\minefield
f:\console\dos\zip -1 -r d:\mozilla\profiles\firefox\4.0\standard.zip z:\standard
F: is my WinXP boot drive. An assortment of command line utilities live in the \console\dos directory, and it's in the system PATH. D: is a data drive holding stuff largely common across OSes. (The desktop multi-boots Win2K Pro, WinXP Pro, and Ubuntu Linux.)
After some experimenting, the simplest and quickest approach proved to be using zip archives. The open source
Info-zip versions of zip and unzip are used.
It turned out to be fastest to simply unzip archives of the directories to the ramdisk: details like creation of sub-directories happen automatically. And opening and extracting the zip file means only finding and opening one file. The previous method simply copied the directory contents, and required finding and copying many files.
Likewise for storing the files on shutdown. A recursive zip of the directories on the ramdisk updates the zip files on the HD. Oddly, it was actually a bit faster to use the "fast" compression compression method when creating the zip archives, instead of simply storing the files uncompressed.
There are a few tweaks to be made, like adding error checking and logging - running the scripts the way I do means they are invisible background tasks, so if something fails, I won't see it when it occurs, and will need a log to find out what happened.
But so far, so good.
______
Dennis