QUOTE (franks59 @ Feb 16 2010, 05:02 PM)

Ok, one more question on the awealloc method.
How can I use the awealloc method with a mountpoint other than a drive letter (NTFS mountpoint)?
I can create the mountpoint just fine, but it is unusable since it cannot be formatted, and the awealloc "image file" is not really an image of a disk.
Oh, I agree that is kind of awkward...
QUOTE (franks59 @ Feb 16 2010, 05:02 PM)

I'm not really interested in a reparse point per se, I don't want a drive letter assigned at all, just the NTFS mountpoint.
Volume mount points are implemented as NTFS reparse points. What do you mean that you want and what is it that you do not need?
The easiest workaround as it works right now is probably to create a temporary drive letter, format using this drive letter and then remove the temporary drive letter.
Alt 1: use the
-m T: parameter and when the disk is created and formatted remove it with
dosdev -d T: and create an NTFS reparse point that links to the disk instead using for example
junc C:\ramdrive \Device\ImDisk0\ or something like that.
Alt 2: use syntax to create a subdirectory mountpoint, for example
-m C:\ramdrive parameter but without formatting. Then create a temporary drive letter using
dosdev -r T: \Device\ImDisk0 and use the format command on it and when formatted remove the drive letter again with
dosdev -d T:.
(junc.exe and dosdev.exe are on my website.)
QUOTE (franks59 @ Feb 16 2010, 05:02 PM)

If this cannot be done as is, could you please point me to a place in the code (cli\imdisk.c - ImdiskCliCreateDevice ?), and what needs to be done conceptually to make it work, i.e. create a DosDevice or Volume so that it can be formatted like "format \\?\Volume{f0a157ce-1cc8-4a05-ad8f-a0ad2bebade2}\" ?
I agree that ideally this could be automated into imdisk.exe by adding this temporary drive letter logic around the call to
format.com when a new disk is created without a drive letter and the
-p switch is also specified to format the disk.
Technically speaking, this logic could be isolated to the ImDiskCliFormatDisk function and applied only when it is called with something else than a drive letter followed by a colon as the MountPoint parameter (but I suspect you would need an extra parameter DeviceNumber to this function so that it knows where to point the temporary drive letter it might have to create). You are more than welcome to write something like that!
...and thanks a lot for posting ideas like this!