Running ramdisk via commandline works fine in "good-cases". But when i try to use it in some automated areas there are some work to do for best usage.
1) use dos-errorlevel to indicate errors. e.g. currently running /del:C will raise ERRORLEVEL==0 - normally that means success. OK, a workaround is to check if the drive is available after adding+mounting or gone after unmounting+deleting but the better usage is to check the errorcode e.g. for usage in ant-exec tasks
2) do not use alert-boxes running from cmdline. When scripting e.g. /del:C (that means a drive which is not a ramdisk) the call will raise a modal dialog which makes it impossible to use it automatically because it will block the whole process 'til the user has confirmed. Tried to use /hise but this seems not to work.
3) add a /force switch to /add to force getting memory. Currently the command fails when e.g. acquiring 4G on a system which has 3G left and 8G total, so applications normally can be moved to swapfile from the system. This is required for environments which are using processes using high amount of ram for a short period of time (e.g. released by GC in C# or java). Alternatively wait until the memory is available...