NTLite $OEM$ folder

ddonais

New Member
Messages
2
Reaction score
2
Ok so I have an unattended setup, where it creates all of the required partitions, plus one for DATA all on the same drive.

Partition 1 EFI 260MB
Partition 2 MSR 16MB
Partition 3 Primary 150000MB (C Drive)
Partition 4 Primary 499MB (Recovery)
Partition 5 Primary Extend to rest of drive space (D Drive) Label DATA

I have put some files in the following folder in the ISO. \sources\$OEM$\D\

however they don't get put there, they get put to the root of the C drive.

Is it not creating and formatting the D Drive partition early enough?

any help would be greatly appreciated.
 
Is it not creating and formatting the D Drive partition early enough?
The reason is more complicated.
Setup isn't done borrowing D: drive for the install media (DVD).

When you don't reserve a drive letter, Windows assigns the DVD to D: and your data partition ends up E:

When you reserve D:, Windows overrides it temporarily to keep D: on the DVD and continues installation. Setup intends to hand the drive letter back when it's done, and remap the DVD to E: (next letter available after D: ).

Unfortunately, copying $OEM$ folders happens before the handoff.
C:\Windows\Panther>findstr "$OEM$ D:" setupact.log
2022-04-05 23:05:33, Info [0x0606cc] IBS ApplyDiskOperationUsingService: Saw request to offline-assign drive letter [D:] to partition on disk [0] at offset [0x418800000]; deferring...
2022-04-05 23:05:45, Info SetupCopyQueueAdd:Not adding [D:\Sources\install.wim] on media [0] to Setup copy queue.
2022-04-05 23:18:02, Info IBS CallBack_CopyPrivates:Install root is [D:\Sources], Local sources folder path is [E:\$WINDOWS.~LS\Sources], Destination path is [E:\]
2022-04-05 23:18:03, Info IBS CopyPrivatesToLocalSourcesFolder:Successfully copied from [D:\Sources\$OEM$] to [E:\$WINDOWS.~LS\Sources\$OEM$]
2022-04-05 23:18:03, Info IBS CopyOEMFolderToLocalSourcesFolder:Successfully copied from [D:\Sources\$OEM$] to [E:\$WINDOWS.~LS\Sources]
2022-04-05 23:18:03, Warning [0x0606cc] IBS CreatePath: Unable to create [D:\FOLDER]; GLE = 0x5
2022-04-05 23:18:04, Error [0x0641f6] IBSLIB CopyOptionalDirectories: Error Copying Optional Directory [E:\$WINDOWS.~LS\Sources\$OEM$\D] -> [D:\][gle=0x00000005]
2022-04-05 23:18:27, Info [0x0602c6] IBS FixMountedDevicesKey:Fixing mounted devices key for Disk [0] Partition offset [0x418800000] to come up as Drive letter D:

The simple (and cheesy) answer is to change it to $OEM$\E, since it's where your partition will be WHEN the copy happens. Windows will reverse the drive letters by the time your desktop appears.

Or avoid all drive conflicts, by assigning the data partition to E: or F:
 
My ideas didn't work out.

For testing, I tried making $OEM$\A, B, C, D, E, F folders at the same time. The result was C: had folder E, and D: had nothing.

What happens if I change the data partition to F: ? Same result as above.
What happens if I don't assign a drive letter? Windows won't even mount the volume.

Conclusion? $OEM$\[drive letter] doesn't work!

You'll have to stage your files into $OEM$\$1\Temp, and run a Post-Setup command to move C:\Temp over to D:
 
There are some limitations to $OEM$ but work within those limitations and it is bomb proof, but not pebkac proof.
 
There are some limitations to $OEM$ but work within those limitations and it is bomb proof, but not pebkac proof.
What's broken is the MS docs (last updated 2020-11):

FolderDefinition
$OEM$\driveletter\subfolderRepresents other drive letters and subfolders. Multiple instances of this type of folder can exist under the $OEM$\driveletter folder. Example: $OEM$\D\MyFolder .

My gut feeling says this stopped working in W10, and no one flagged it.
 
Hmm,,,. I only use $OEM$ for the basics on c:\. I prefer todo stuff later because i will have different partition layouts depending on the scenario.
 
Last edited by a moderator:
I think it never worked functionally.. I never got my drive letters showed up correctly when i fresh install.... so that function might be dropped knowingly
 
Back
Top