Wednesday, January 30, 2013

Deployment issues with OSDPreserveDriveLetter parameter

Last time I want to create a Windows 7 reference image in SCCM/ConfigMgr 2012 SP1. The new method for deploying Windows 7 is by INSTALL.WIM. No Setup.exe is used anymore for creating a reference image. By default Windows 7 will be installed on the D: drive. For installing Windows 7 on the C: drive an additional parameter is needed. Just add "OSDPreserveDriveLetter=False" before the Apply OS step, which allows the task sequence to auto-correct the D: issue. Sounds easy isn't it?

Update 4-6-2013:
In the task sequence choose Add > General > Set Task Sequence Variable. Fill in the following information:
- Task Sequence Variable: OSDPreserveDriveLetter
- Value: False
Just add this command before the Apply Operating System step.

Now it comes: When creating a reference image without the parameter, this must be included during OS deployment. When deploying a task sequence without the parameter, everything goes fine, but Windows 7 is installed on the D: drive. When deploying a task sequence with the parameter, deployment stops after installing the ConfigMgr client. No applications are installed and no certificate is available in the ConfigMgr client. Also the ConfigMgr Site can't be found by the ConfigMgr client.

Error message in CCMSETUP.LOG:
- File C:\WINDOWS\ccmsetup\{1AF71F68-6089-4211-ADDC-06DF40606141}\client.msi installation failed. Error text: ExitCode: 1603
- Client installation has failed too many times. Ccmsetup will now abort.

Next thing to try is to create a new reference image with the parameter included. When creating a reference image with above step, the parameter isn't needed anymore during OS deployment. However, OS deployment stops again after installing the ConfigMgr client. At the first application mentioned in the task sequence everything stops.

Error message in SMSTS.LOG:
- (__hrMethodRetVal == ((HRESULT)0L)) || (bFailIfMissing == false), HRESULT=80070002 (e:\NTS_SCCM_RELEASE\sms\common\inc\ccmxml.h,582)- 401 - Authentication failure on request with anonymous access, retrying with context credentials.

I solved above issue by creating and deploying a new task sequence, with all same applications and steps in it. Then it all was working again. I'm happy that it seems to work now, but doesn't get why it didn't the first time? Anyone recognize the error messages?


  1. We didn't have the same errors but your blog got me thinking! After upgrading our environment to SP1 the Windows 7 task sequences didn't work anymore. It seemed that Windows somehow got installed on drive D: instead of C:. After change OSDPreserveDriveLetter to True everything is running fine again :-)

    What does OSDPreserveDriveLetter exactly do and why is this included in SP1?

    1. This variable determines whether the task sequence uses the drive letter on the operating system image WIM file.

      In SP1 no Setup.exe is used anymore, but Install.wim can be used. Install.wim is installed by default on the D: drive.

  2. You can put the OSDPreserveDriveLetter variable in the Build & Capture TS but a way around it if you want to use your currently captured image is to enter the following installation properties in the "Setting Up Windows and Configuration Manager" stage:

    /forceinstall /MP: /SMSSLP=

    1. I'm experiencing the exact same issues. Luckily the switches /forceinstall /MP: /SMSSLP= work as expected and the task sequence continues succesfully!

      Thanks :-)

    2. I have the same issue .
      I am happy the parameters /forceinstall /MP: /SMSSLP= worked
      Johan Erven

  3. "Just add "OSDPreserveDriveLetter=False" before the Apply OS step, which allows the task sequence to auto-correct the D: issue. Sounds easy isn't it?"

    You haven't mentioned how you can do that...

    1. Sorry, will change the post ASAP. Hope you like it! :)

  4. What would be the best practice? I'm using OSDTargetSystemRoot and value C:\Windows on my device collection as variable (Deploying windows 8 though)

    1. OSDPreserveDriveLetter=False is needed for Windows 7 only. Windows 8 will be installed on the C: drive by default.

  5. Hi Henk,

    I'm still unsure which approach I should use - still not working for me. Will this work?
    - Capture image with OSDPreserveDriveLetter=False
    - Create a fresh Task Sequence
    - Then deploying that task sequence without above parameter.

    If its another way around please help me

    Best Regards
    Anders Jensen

    1. Hi Anders,
      That's exactly the way I do it. Just run it one time in the Build and Capture task sequence, and you're done!
      Regards, Henk

  6. I think I'm experiencing a similar issue. The OSD works as expected on most of our models and installs everything to the C:\ correctly, except if that machine has a DVD drive.

    With a DVD drive attached, it applies the WIM to the C:\, when it gets to the step "Setup Windows and Configuration Manager" it attempts to install the following file to the D:\
    "Product: Configuration Manager Client -- Error 25180. Setup was unable to apply security permissions to D:\Windows\System32\ccmcore.dll
    The error code is 80070015"
    Of course, there are no files on the D:\, so it can't install. Everything else is on the C:\.

    I've tried to add steps in the TS to remove/disable the DVD drive, or using diskpart to remove/assign a different letter, but part of the Config manager install is a reboot part way, so these changes are lost. If I manually remove the D:\ at this point, the task sequence continues with no errors.

    I don't think this is related to the WIM/Build & Capture as everything else applies to the C:\ bar this one file. Do you have any suggestions? I'm going to capture a fresh WIM soon to rule that out.

    1. You can also try to deploy the image on a specific disk and partition instead of doing it automatically. Maybe that will do the job for you?