We’re slowly rolling out Windows 10 to our Windows 7 and 8 computers, be we only want the computers to upgrade if they are already UEFI, so we can then enable Secure Boot and all the good stuff that goes along with it.
While we try to ensure we only target machines that are UEFI enabled, we know there is a chance that it might get run on a computer that is not. To that point, I’ve built in safe guard to make sure the TS stops and the computer stays at the OS level it is, until it can get wiped and reloaded.
To achieve these results, I had to re-engineer how I did this. I have a similar method for our Bare-Metal installs (Blogged HERE), but the same process didn’t work when starting the TS from inside the OS.
- Group: Confirm UEFI or Fail TS and Reboot – This requires _SMSTSBootUEFI = True
- “Notify UEFI Status – Machine Not Set to UEFI” – Command Line:
MessageBox\serviceUI.exe -process:TSProgressUI.exe %SYSTEMROOT%\System32\wscript.exe MessageBox\UEFIStatus-NotUEFI.vbs
This is using the serviceUI.exe from the MDT Package (tools\x64) and a modifed vbs Script borrowed from windows-noob, originally created to Pause TS. (Script shown below)
It is using the serviceUI.exe file (available in the MDT package) to be able to interact with the user desktop. There is a lot of info about this just google “serviceUI.exe”.
This step calls my OSD-Windows10Scripts package, where I have a folder called MessageBox, where I keep the vbs file & the serviceUI.exe file. - “FAIL Task Sequence” – Command Line: FAIL – This will just make the TS Fail.
- “Notify UEFI Status – Machine Not Set to UEFI” – Command Line:
Script: “UEFIStatus-NotUEFI.vbs”
‘Script to tell the user that the task sequence is paused.
‘windows-noob.com (c) August 2013.‘hide the Task Sequence Progress window
Set TsProgressUI = CreateObject(“Microsoft.SMS.TsProgressUI”)
TsProgressUI.CloseProgressDialog‘Popup Message
MsgBox “This Machine is not Running in UEFI, In-Place Upgrade will NOT be available, must do Wipe & Reload Install of Windows 10.” & chr(13) & “Click on Ok.”, 64,”Requires UEFI – Failed Upgrade”
wscript.quit(0)
Script available in the “MessageBox” folder in the download HERE. (OSD-Windows10Scripts folder)