If you are trying to flash a macOS DMG file to a USB drive on Windows and hit the dreaded error, you aren't alone. This is one of the most common hurdles when using TransMac.
Go back to TransMac; the drive should now be "unallocated" and ready for formatting. 4. Disable Windows Defender or Antivirus Temporarily transmac drive has been locked by another program hot
The "Drive has been locked" error is almost always a result of or an Antivirus process refusing to let go of the USB. Using the diskpart clean method is the most reliable way to strip those locks and give TransMac the "clean slate" it needs. If you are trying to flash a macOS