My mid-2011 iMac is currently wiped, and I'm struggling to reinstall the OS (either Sierra or High Sierra).
I've read that these .dmg files can be installed from the Apple Store directly, but are not provided if you are on a windows pc. I'm sure someone out there has found a solution, but I can't seem to find any.
Use TransMac, which has a 15-day trial period and works flawlessly.
In the left pane, right click the USB Drive and select Format Disk for Mac
In the left pane, right click the USB Drive and select Restore with Disk Image
Point to your .dmg (or choose All Files to select an .iso) file and click Open.
It will take a few minutes depending on size of .dmg and speed of USB drive, but once done you can pop it into your mac, hold down the option key when turning on the mac and choose the USB drive.
TransMac worked for me, but first you need to partition your USB drive with GPT. It will not work if partitioned as MBR. diskpart on Windows can do this:
diskpart
DISKPART> list disk
(Find the disk number)
DISKPART> select disk 2
Disk 2 is now the selected disk.
DISKPART> clean
DiskPart succeeded in cleaning the disk.
DISKPART> convert gpt
DiskPart successfully converted the selected disk to GPT format.
DISKPART> create partition primary