Open marcohald opened 3 years ago
Thanks, I'll see how I can add a check for a C: Drive and remove it like I am doing with the USB Drive Letters. Can you run a Get-Volume for the Card Reader?
At the moment i don't have access to a device with this problematic card reader.
But as written before
The Problem is that the Get-Volume CMDlet return a Object but it can't be consummed by the Get-Partition CMDlet
As far as I can remember the mountvol.exe was the only way that can handle the cardreader without an inserted card
This issue has been around for ages in different OS deployment scenarios. :) Especially when the HDD/SSD is not partitioned. I just recently started trying out OSDCloud and just wanted to add my 2 cents on how we approached this: Get your hands on the 64-Bit Version of Devcon (might be a bit harder to find, but can be googled) and add: devcon.exe disable USBSTOR* and possibly devcon.exe disable CDROM To just disable the devices that can "steal" the C-Drive.
Describe the bug The Driveletter C was assigned to the empty Card reader and was not deletable via the line https://github.com/OSDeploy/OSD/blob/9bb7639c7381b0ef5c1dee9db1582be33f4a16c7/Public/Disk/New-OSDisk.ps1#L282 The Problem is that the Get-Volume CMDlet return a Object but it can't be consummed by the Get-Partition CMDlet The Partition for the OS was not created via
Start-OSDCloud -ImageFileUrl $imageUrl -ZTI
and the Recovery Partition was the Size of the Remaining SpaceI tried to change the Driveletter via WMI but that didn't work either
Expected behavior clear the letter assignment
Additional context As a workaround I have added the Line &mountvol C: /D to my script