none
MDT Deploy form USB RRS feed

  • Question

  • Hi All,
    I have an entire deploy that works through WDS and everything works properly.
    The Sales department asked me to create the same Deployment but via USB to remote branches without a network connection.

    I created the USB but encountered a problem.
    The deployment is deployed is the following (Operating System & software):

    I have two physical drives divided into-
    Drive 1 is divided into two logical partitions: OS with letter C: and The second partition for DB the letter D:
    Drive 2 whole physical partition to a single partition with the letter E: 

    The problem is this- because the Deploy is from USB, after the OS installed in the PC OOBE the USB receives the letter E!
    Once I try to change the letter in any way - the Deploy will fail because it loses the connection to USB. I tried every article I found so far on the web... )-:

    Please your help...
    Monday, October 29, 2018 5:27 PM

All replies

  • I also have the same problem. the USB key takes the letter D: while the second partition of my DISK 0 which is supposed to take it. when I change the letter of the USB key the deployment  finished With errors.
    Monday, November 5, 2018 9:55 AM
  • I found the solution!

    Run a script after setup is complete with SetupComplete.cmd  (https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/add-a-custom-script-to-windows-setup)

    This is the script I run in SetupComplete.cmd:

    @echo off
    cls
    title "Changing device drive letters..."
    set ChangeNeeded=
    
    echo Changing device drive letters...
    
    :: Create a script file to be used by diskpart and then dump all volumes to a temp file
    	echo list volume > %systemdrive%\ListDrives.tmp
    	diskpart /s %systemdrive%\ListDrives.tmp > %systemdrive%\CurrentDrives.tmp
    
    :: Parse the output from 'Diskpart> list volume' for available volumes
    	:: To change the following so that it works on different drive letters change the "H ____" and the set DriveH= to match the drive letter you want to move
    	:: See the following samples for examples of how to change the drive you want to move
    
    	echo   Checking drive D: for devices that need to be moved...
    	FOR /F "tokens=2-4" %%a IN (%systemdrive%\CurrentDrives.tmp) DO @IF /I "%%b %%c" == "D MDTBoot" @echo   Drive %%b was found to have a %%c and will be moved... & @set DriveH=%%a
    	FOR /F "tokens=2-4" %%a IN (%systemdrive%\CurrentDrives.tmp) DO @IF /I "%%b %%c" == "D CD-ROM" @echo   Drive %%b was found to have a %%c and will be moved... & @set DriveH=%%a
    	FOR /F "tokens=2-4" %%a IN (%systemdrive%\CurrentDrives.tmp) DO @IF /I "%%b %%c" == "D DVD-ROM" @echo   Drive %%b was found to have a %%c and will be moved... & @set DriveH=%%a
    	
    	echo   Checking drive E: for devices that need to be moved...
    	FOR /F "tokens=2-4" %%a IN (%systemdrive%\CurrentDrives.tmp) DO @IF /I "%%b %%c" == "E MDTBoot" @echo   Drive %%b was found to have a %%c and will be moved... & @set DriveG=%%a
    	FOR /F "tokens=2-4" %%a IN (%systemdrive%\CurrentDrives.tmp) DO @IF /I "%%b %%c" == "E CD-ROM" @echo   Drive %%b was found to have a %%c and will be moved... & @set DriveG=%%a
    	FOR /F "tokens=2-4" %%a IN (%systemdrive%\CurrentDrives.tmp) DO @IF /I "%%b %%c" == "E DVD-ROM" @echo   Drive %%b was found to have a %%c and will be moved... & @set DriveG=%%a
    
    	:: In the following change the Drive_ and the letter=_: to match the drive you want to move from and to
    	IF DEFINED DriveH set ChangeNeeded=1
    	IF DEFINED DriveH echo select volume %DriveH% >> %systemdrive%\ChangeDrive.tmp
    	IF DEFINED DriveH echo assign letter=P: >> %systemdrive%\ChangeDrive.tmp
    	IF DEFINED DriveH set DriveH=
    	
    	IF DEFINED DriveG set ChangeNeeded=1
    	IF DEFINED DriveG echo select volume %DriveG% >> %systemdrive%\ChangeDrive.tmp
    	IF DEFINED DriveG echo assign letter=Y: >> %systemdrive%\ChangeDrive.tmp
    	IF DEFINED DriveG set DriveG=
    
    :: Run diskpart using the new script file, wait 15 seconds before running per a note on http://msdn.microsoft.com/en-US/library/ff794606.aspx
    	if "%ChangeNeeded%" == "1" (
    		echo   Changing devices to new drive letters...
    		ping -n 15 localhost 1>nul 2>nul
    		diskpart /s %systemdrive%\ChangeDrive.tmp 1>nul 2>nul
    	) else (
    		echo   No devices need to be changed...
    	)
    
    	echo Done...
    
    exit /b 0

    • Proposed as answer by JiteshKumar Wednesday, November 7, 2018 12:52 PM
    Tuesday, November 6, 2018 9:50 AM