Hello,
I am trying to automate a fairly simple process with the OSFMount CLI to execute on Windows boot, but running into a snag that causes me to always having to manually take the last step. Hoping someone here can help me figure this one out.
I already have a batch script working that automatically mounts an empty RAM Disk with a specified drive letter, and formats it as FAT32, which is awesome.
I am now trying to also make this RAM Drive a removable media via CLI, but I can't get it to work.
Here is the script I use, note the 2nd option ",rem" behind the -o flag that is resulting in an error.
I realized that "rem" is also used for comments in batch scripts (oh boy Microsoft), but not sure if that's the only problem here.
The error I get with the script above:
I'd appreciate any help!
I am trying to automate a fairly simple process with the OSFMount CLI to execute on Windows boot, but running into a snag that causes me to always having to manually take the last step. Hoping someone here can help me figure this one out.
I already have a batch script working that automatically mounts an empty RAM Disk with a specified drive letter, and formats it as FAT32, which is awesome.
I am now trying to also make this RAM Drive a removable media via CLI, but I can't get it to work.
Here is the script I use, note the 2nd option ",rem" behind the -o flag that is resulting in an error.
Code:
@Echo OFF SET RAMDISK_DRIVE=R: SET RAMDISK_SIZE=1G SET RAMDISK_LABEL=RAM Disk IF NOT EXIST "%RAMDISK_DRIVE%" ( "%PROGRAMFILES%\OSFMount\OSFMount.com" -a -t vm -s %RAMDISK_SIZE% -o format:fat32:"%RAMDISK_LABEL%",rem -m "%RAMDISK_DRIVE% MKDIR "%RAMDISK_DRIVE%\TEMP" )
The error I get with the script above:
Creating device...
Created device 5: S: -> VM image
Formatting drive with volume label RAM Disk
Unknown Error encountered during formatting of RAM Disk. Manual format may be necessary.
Unknown Error encountered during formatting of RAM Disk.
Manual format may be necessary after disk is mounted.
The volume does not contain a recognized file system.
Please make sure that all required file system drivers are loaded and that the volume is not corrupted.
Created device 5: S: -> VM image
Formatting drive with volume label RAM Disk
Unknown Error encountered during formatting of RAM Disk. Manual format may be necessary.
Unknown Error encountered during formatting of RAM Disk.
Manual format may be necessary after disk is mounted.
The volume does not contain a recognized file system.
Please make sure that all required file system drivers are loaded and that the volume is not corrupted.
Comment