Press Win + R , type cmd , and press Ctrl + Shift + Enter to open as Administrator. Type diskpart and press Enter. Type list disk to view all drives.
If you've tried all the above steps and the drive remains locked, the problem might be physical corruption. You should:
The Windows Disk Management tool is open.
You are trying to flash a macOS DMG file to a USB drive on Windows, but TransMac stops you with a frustrating error: This common issue happens because Windows or a background application is aggressively accessing your USB drive, preventing TransMac from gaining exclusive write access. Why This Error Happens transmac drive has been locked by another program hot
Try using TransMac. You can the service again once you finish. Top Free Alternatives to TransMac
TransMac Error: "Drive Has Been Locked by Another Program" – Causes and Fixes
If you're getting the "locked by another program" error while trying to "Restore with Disk Image," it’s because a background process has "claimed" the drive. Here is how to fix it: Press Win + R , type cmd ,
in TransMac, it essentially means Windows is "holding onto" the USB drive, preventing TransMac from gaining the exclusive low-level access it needs to write the DMG file. Here is a breakdown of why this happens and how to fix it. Why the Drive is Locked
Type list disk and look for your USB drive number (e.g., Disk 1 or Disk 2 based on storage size).
Because Windows and macOS use entirely different file systems, Windows often tries to automatically index, scan, or claim ownership of a newly inserted Mac-formatted drive. When TransMac attempts to gain exclusive write access to the drive, it gets blocked. If you've tried all the above steps and
Macs sometimes leave drives in a “dirty” state. Connect the drive to a real Mac, run → select the drive → First Aid . Then eject properly. Reconnect to Windows.
If TransMac continues to throw locking errors despite troubleshooting, you can achieve the exact same result using alternative imaging software. is a free, open-source tool that successfully writes macOS .dmg files to USB drives on Windows without the strict locking issues common to TransMac.