Yes. I created this MS-DOS 5.0 VHD in VirtualBox, copied it to a USB pendrive, created a MENU.LST entry, and could boot to DOS under Qemu from RMPrepUSB without problems. There was no such error message box when leaving DOSSHELL. I modified AUTOEXEC.BAT and CONFIG.SYS, and everything worked fine and wasn't forgotten after the next VHD boot.
As I did not use RMPrepUSB for anything else than starting Qemu, I tried to find a more direct way to do this, from the scripting level and without the help of RMPrepUSB, but then stumbled over this write lock problem and saw that Steve made use of a binary named start_VM.exe in his StartFromUSB.cmd script.
For direct comparison with my other scripts and in order to simplify things, I can take the start_VM.exe that is contained in "QEMU Starter exe.zip" (post #44) and place it somewhere within the binary search path, e.g. in the %windir% folder, and create a small wrapper script just providing the parameters start_VM.exe needs:
set arg=file=\\.\PhysicalDrive7,if=ide,index=0,media=disk,format=raw start_VM 7 500 "%ProgramFiles%\qemu\qemu-system-i386.exe" -boot c -m 512 -drive %arg% pause
I also have to right-click on this script in Windows Explorer and run it as administrator to get Qemu running, but this works as desired. For example, I can type "COPY CON HELLO.TXT"<Enter> and "HELLO WORLD"<F6><Enter> at the DOS prompt to create a file. After closing Qemu and finishing the wrapper script, this file can be found in Windows Explorer if the VHD gets attached in Windows Disk Management.
Does anybody dare to check out these mini-scripts on his or her own computer? I did not suffer any loss of data during my experiments, except for the DOSSHELL.INI and HELLO.TXT inside the VHD when not using start_VM.exe. Of course the volume letter (O:) and the physical drive number (7) must be corrected for other machines. You won't tell me that only the Oracle of Delphi knows the solution to this problem, at the price of 411 KiB, will you?