Tuesday, October 1, 2013

Step: 1.7: Build Completed message


In this step we use a VB script to populate a build complete MSG through the task sequence. This MSG box helps the build engineer to whether the Task Sequences completed without any errors or not.
First create a Vb Script (OSDComplate.vbs) and create a package (OSDComplete)
Add VBScript, ServiceUIx32.exe and ServiceUIx64.exe (as below)


OSDComplete.VBS
********************************************************
' OSDComplete.vbs
' This script will prompt a MSG box at the end of the OSD Task Sequence

    Sub Window_Onload
        strComputer = "."
        Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
        Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor")
        For Each objItem in colItems
            intHorizontal = objItem.ScreenWidth
            intVertical = objItem.ScreenHeight
        Next
        intLeft = (intHorizontal - 800) / 2
        intTop = (intVertical - 600) / 2
        window.resizeTo 800,600
        window.moveTo intLeft, intTop
    End Sub
' Hide the progress dialog

Set oTSProgressUI = CreateObject("Microsoft.SMS.TSProgressUI")
oTSProgressUI.CloseProgressDialog
Set oTSProgressUI = Nothing


MsgBox "Windows 7 Operating System deployed Successfully."& vbCrLf & vbCrLf & _
     "Please click OK To login to your computer", 64, "Operating System Deployment Successful"

**************************************************************

Add a new group “Build Completed MSG” same level as pre-Fianl Reboot.  Build completed MSG will be initiated when following conditions are met;


Add “Run Command Line” step and name it Build Completed.
 On the Command line;
                C:\Windows\System32\cscript.exe OSDComplete.vbs
                Select Disable 64-bit file system redirection
                Select OSDComplete package


When the Task Sequence reaches Build Complete MSG step, the Task Sequence will display the build complete MSG as Below;

One important thing here is;
The technician must click OK to continue to the log on screen. If exiting the MSG box in any other ways will be treated as failed. 

Click here for complete list of tasks for SCCM OSD All in one task sequence.
Click here for SCCM OSD All in one task sequence Visio diagram.

No comments:

Post a Comment