“Please reinsert the media (CD, DVD, or USB) needed to complete the deployment.” error when deploying via an MDT Media Share

By | July 14, 2016
Share

Please reinsert the media

When a computer takes longer than MDT likes to locate the Media share to complete the Deployment, this error is presented. It will retry to locate the deployment when OK is clicked, but if this happens on a unit quite a bit, use this workaround.

Add the following code to your Scripts\Litetouch.wsf

'//----------------------------------------------------------------------------
'// Set the deployment method
'//----------------------------------------------------------------------------
bFoundMedia = False


'//----------------------------------------------------------------------------
'// FIX for locating USB Deployment Media
'//----------------------------------------------------------------------------
'Delay search for media 10 seconds.
Wscript.Sleep 10000
'Device Manager action: Scan for Hardware ...
sCmd = "c:\Windows\System32\rundll32.exe cfgmgr32.dll ,CM_Reenumerate_DevNode"
'Delay for 5 seconds to allow hw to ennumerate
Wscript.Sleep 5000


iRetVal = RunAndLog(sCmd, true)
For Each oDrive in oFSO.Drives

/BrianG

How to make your VM use a static IP when booting an MDT WinPE image.

By | March 17, 2016
Share

When VMs exist in static IP environments and a VM is being used to capture a thin image with MDT, the boot image must be instructed to use a static IP during the capture process.  Here is my method of achieving this.

  1. Download the “SetStaticIP.vbs” and updated “Unattend.xml” file, using the following link: https://drive.google.com/open?id=0BwHI1r8k8A75S2w0UkZUeWM3NzA
  2. Update the “SetStaticIP.vbs” to assign your desired static IP.
  3. Add both files to an empty folder.
  4. Add the folder to your MDT boot image “Extra Files”.
  5. Lastly, Update your Deployment Share.

 

Script on GitHub:
https://github.com/brianfgonzalez/Scripts/blob/master/Static%20IP/SetStaticIP.vbs
https://github.com/brianfgonzalez/Scripts/blob/master/Static%20IP/Unattend.xml

/Brian G

Split GPS COM Ports using com0com and hub4com

By | November 19, 2015
Share

Here is a script I wrote to split GPS COM ports to multiple virtual COM ports.  In this

  • Create virtual COM ports 14 and 15 using com0com (Used a high number to avoid hitting a conflict with an existing port).

Download link: https://code.google.com/p/powersdr-iq/downloads/detail?name=setup_com0com_W7_x64_signed.exe&can=2&q=

start /w "" "%~dp0setup_com0com_W7_x64_signed.exe" /S

cd /d "C:\Program Files (x86)\com0com"
setupc.exe install 0 - PortName=COM14,EmuBR=yes
setupc.exe change CNCA0 EmuBR=yes
setupc.exe change CNCA0 HiddenMode=yes
setupc.exe install 1 - PortName=COM15,EmuBR=yes
setupc.exe change CNCA1 EmuBR=yes
setupc.exe change CNCA1 HiddenMode=yes
  • 2. Locate assigned GPS Com port.

Download link: http://www.pcre.org/current/doc/html/pcre2grep.html

wmic PATH Win32_PnPEntity Where (Name LIKE '%%NMEA%%' or Name LIKE '%%GPS%%') get Name | "%~dp0pcre2grep.exe" -e "COM[0-9]{1,3}" -o>"%temp%\COMPORT.txt"
SET /P COMPORT=<%temp%\COMPORT.txt
  • Use hub4com to span GPS port to 2 virtual COM ports.

Download link: http://sourceforge.net/projects/com0com/files/hub4com/

copy /Y "%~dp0hub4com.exe" "C:\Program Files (x86)\com0com\"

cd /d "C:\Program Files (x86)\com0com"
hub4com --baud=9600 --route=0:All \\.\%COMPORT% \\.\CNCA0 \\.\CNCA1

Lastly, copy a start hub4com batch file to to the Windows startup to force hub4com to start on Windows login.

copy /Y "%~dp0RunAsSvc.exe" "C:\Program Files (x86)\com0com\"

copy /Y "%~dp0Start hub4com.bat" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"

/Brian G