MDT 2013: Installing MDT 2013

Now we are going to install MDT 2013. This is a simple process but I wanted to show you anyways.

After you have downloaded MDT 2013 from Microsoft (See This Post)

When you first Launch the MDT 2013 Installer, you should see the following screen:

MDT2013_1

Click Next to Continue

MDT2013_2

Accept the License Agreement and click Next:

MDT2013_3

Choose the Location that you want MDT 2013 to be installed.  This is typically left alone but you are more than welcome to install it on a separate partition/drive.  Once you’ve chosen the appropriate location, Click Next:

MDT2013_4

I typically choose not to join their CEIP but it’s up to you.  Click Next:

MDT2013_5

Now, Click Install

That’s It!  It’s pretty straight forward….  Now onto the good stuff!  We will be setting up our MDT 2013 Deployment Share in the next post.

Also, I am in the process of making a video that will explain and show all of these steps

Enjoy!

Advertisements

MDT 2013: Installing ADK for 8.1

Once you have all of the necessary files downloaded and saved on your Windows Server 2012 R2 box, then begin by installing the “adksetup.exe”.

The first screen that should pop-up is this one:

ADK_1

The Following Screenshots are all based on your own needs but these are the options that I have chosen for this setup:

I choose to download the ADK instead of installing it.  The reason I do this is because I like to keep a backup of the original file, just in case the server crashes or something else happens.

Click Next

ADK_2

I typically choose to not accept the CEIP, mostly because it adds a little database file in AppData that i’ve seen become corrupt and cause log in issues. If you choose to, it should be fine.

Click Next

ADK_3

Wait until the adksetup has been downloaded then proceed to the location that you save it to.

ADK_5

Click Close and then run the downloaded ADK

ADK_6

Specify the location that you want to install the ADK files.  I personally like to store them on a separate drive than the OS but it’s up to you.

Click Next

ADK_7

Click Accept

ADK_9

Again, it’s up to you but I always select No.

Click Next

ADK_8

Below are the features that I install but you could install all of them.  Here is why I choose why I install the following.

Deployment Tools:  You need to install Deployment Tools as this holds DISM and other tools that are needed by MDT

Windows PE: You need to install this for MDT to work

USMT: This is User State Migration Toolkit.  Think of this as a tool to migrate user data (Migwiz)

SQL Server: I mostly install this because you can use it to setup a backed database for MDT, it’s not necessary unless you plan on using it.

Click Install

ADK_10

Once the installation is complete, click Close

ADK_11

Congratulations, you’ve installed ADK on your Windows Server 2012 R2 box.  Next we will install MDT 2013.

Enjoy!

MDT 2013: Setting up MDT 2013 with ADK for Windows 7, 8, & 8.1

Hello Everyone, in the following few weeks I will creating several new posts about setting MDT 2013 on Windows Server 2012 R2 to enable you to image your Dell OptiPlex & Lattitude machines. This will be similar to my MDT 2012 Update 1 Guide but a bit different as well. I hope you enjoy!

To Start things off, you need to download the following pieces of software:

MDT 2013
ADK for Windows 8.1
Windows 8.1 ISO/DVD
Windows 7 ISO/DVD
WinPE 5.0 Driver CAB – From Dell

I will continue on my next post.  MDT 2013: Installing ADK

MDT 2013: Pin Start menu & Task Bar Shortcuts through Task Sequence

Below is how we stopped modifying the Start Menu & Task Bar shortcuts on our Default Image (GOLD IMAGE) using MDT 2013 Task Sequence.  This applies to Windows 7 and I’m sure it could be modified to work with Windows 8.1.  Check it out below and let me know if you have any questions.

To do this, you are going to need the following scripts in a folder on your MDT 2013 Server.

Copy_To_Default_User_Startup.cmd

copy "\\mdtserver01\DeploymentShare$\Applications\Set_TaskBar_&_StartMenu_Shortcuts\RunDefaultUserStartupScripts.vbs" "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" /Y
copy "\\mdtserver01\DeploymentShare$\Applications\Set_TaskBar_&_StartMenu_Shortcuts\SetTaskBar.vbs" "C:\Users\Public\Downloads" /Y
copy "\\mdtserver01\DeploymentShare$\Applications\Set_TaskBar_&_StartMenu_Shortcuts\PinStartMenuShortcuts.bat" "C:\Users\Public\Downloads" /Y
copy "\\mdtserver01\DeploymentShare$\Applications\Set_TaskBar_&_StartMenu_Shortcuts\PinItem.vbs" "C:\Users\Public\Downloads" /Y

RunDefaultUserStartupScript.vbs

'HideCMDWindow Script
CreateObject("Wscript.Shell").Run "C:\Users\Public\Downloads\SetTaskBar.vbs", 0, True
CreateObject("Wscript.Shell").Run "C:\Users\Public\Downloads\PinStartMenuShortcuts.bat", 0, true

SetTaskBar.vbs (I got this from somewhere online and modified it a bit, sorry I can’t give credit where credit is due)

Option Explicit

Const CSIDL_COMMON_PROGRAMS = &H17
Const CSIDL_PROGRAMS = &H2
Const CSIDL_STARTMENU = &HB

Dim objShell, objFSO
Dim objCurrentUserStartFolder
Dim strCurrentUserStartFolderPath
Dim objAllUsersProgramsFolder
Dim strAllUsersProgramsPath
Dim objFolder
Dim objFolderItem
Dim colVerbs
Dim objVerb

Set objShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objCurrentUserStartFolder = objShell.NameSpace (CSIDL_STARTMENU)
strCurrentUserStartFolderPath = objCurrentUserStartFolder.Self.Path
Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path

' - Remove pinned items -

'Internet Explorer
If objFSO.FileExists(strCurrentUserStartFolderPath & "\Programs\Internet Explorer.lnk") Then
    Set objFolder = objShell.Namespace(strCurrentUserStartFolderPath & "\Programs")
    Set objFolderItem = objFolder.ParseName("Internet Explorer.lnk")
    Set colVerbs = objFolderItem.Verbs
    For Each objVerb in colVerbs
        If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
    Next
End If

'Windows Explorer
If objFSO.FileExists(strCurrentUserStartFolderPath & "\Programs\Accessories\Windows Explorer.lnk") Then
    Set objFolder = objShell.Namespace(strCurrentUserStartFolderPath & "\Programs\Accessories")
    Set objFolderItem = objFolder.ParseName("Windows Explorer.lnk")
    Set colVerbs = objFolderItem.Verbs
    For Each objVerb in colVerbs
        If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
    Next
End If
'Windows Media Player
If objFSO.FileExists(strAllUsersProgramsPath & "\Windows Media Player.lnk") Then
    Set objFolder = objShell.Namespace(strAllUsersProgramsPath)
    Set objFolderItem = objFolder.ParseName("Windows Media Player.lnk")
    Set colVerbs = objFolderItem.Verbs
    For Each objVerb in colVerbs
        If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
    Next
End If

' - Pin to Taskbar -

'Google Chrome C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Google Chrome
If objFSO.FileExists(strAllUsersProgramsPath & "\Google Chrome\Google Chrome.lnk") Then
	Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Google Chrome")
	Set objFolderItem = objFolder.ParseName("Google Chrome.lnk")
	Set colVerbs = objFolderItem.Verbs
	For Each objVerb in colVerbs
		If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
	Next
End If

'Mozilla Firefox
If objFSO.FileExists(strAllUsersProgramsPath & "\Mozilla Firefox.lnk") Then
	Set objFolder = objShell.Namespace(strAllUsersProgramsPath)
	Set objFolderItem = objFolder.ParseName("Mozilla Firefox.lnk")
	Set colVerbs = objFolderItem.Verbs
	For Each objVerb in colVerbs
		If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
	Next
End If

'Internet Explorer
If objFSO.FileExists(strCurrentUserStartFolderPath & "\Programs\Internet Explorer.lnk") Then
    Set objFolder = objShell.Namespace(strCurrentUserStartFolderPath & "\Programs")
    Set objFolderItem = objFolder.ParseName("Internet Explorer.lnk")
    Set colVerbs = objFolderItem.Verbs
    For Each objVerb in colVerbs
        If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
    Next
End If

'Microsoft Outlook 2013
If objFSO.FileExists(strAllUsersProgramsPath & "\Microsoft Office 2013\Outlook 2013.lnk") Then
	Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office 2013")
	Set objFolderItem = objFolder.ParseName("Outlook 2013.lnk")
	Set colVerbs = objFolderItem.Verbs
	For Each objVerb in colVerbs
		If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
	Next
End If

'Microsoft Word 2013
If objFSO.FileExists(strAllUsersProgramsPath & "\Microsoft Office 2013\Word 2013.lnk") Then
	Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office 2013")
	Set objFolderItem = objFolder.ParseName("Word 2013.lnk")
	Set colVerbs = objFolderItem.Verbs
	For Each objVerb in colVerbs
		If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
	Next
End If

'Microsoft Excel 2013
If objFSO.FileExists(strAllUsersProgramsPath & "\Microsoft Office 2013\Excel 2013.lnk") Then
	Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office 2013")
	Set objFolderItem = objFolder.ParseName("Excel 2013.lnk")
	Set colVerbs = objFolderItem.Verbs
	For Each objVerb in colVerbs
		If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
	Next
End If

'Microsoft PowerPoint 2013
If objFSO.FileExists(strAllUsersProgramsPath & "\Microsoft Office 2013\PowerPoint 2013.lnk") Then
	Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office 2013")
	Set objFolderItem = objFolder.ParseName("PowerPoint 2013.lnk")
	Set colVerbs = objFolderItem.Verbs
	For Each objVerb in colVerbs
		If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
	Next
End If



'Delete the script
DeleteSelf

Sub DeleteSelf()       
        
End Sub

PinStartMenuShortcuts.bat

cscript C:\Users\Public\Downloads\PinItem.vbs /item:"C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Outlook 2013.lnk"
cscript C:\Users\Public\Downloads\PinItem.vbs /item:"C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Mozilla Firefox.lnk"
cscript C:\Users\Public\Downloads\PinItem.vbs /item:"C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Excel 2013.lnk"
cscript C:\Users\Public\Downloads\PinItem.vbs /item:"C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\PowerPoint 2013.lnk"
cscript C:\Users\Public\Downloads\PinItem.vbs /item:"C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Word 2013.lnk"
cscript C:\Users\Public\Downloads\PinItem.vbs /item:"C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Publisher 2013.lnk"
cscript C:\Users\Public\Downloads\PinItem.vbs /item:"C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\iTunes.lnk"

PinItem.vbs (same with this one, I can’t remember where I found it but who ever they are, they are awesome!)

' Windows Script Host Sample Script
'
' ------------------------------------------------------------------------
'               Copyright (C) 2009 Microsoft Corporation
'
' You have a royalty-free right to use, modify, reproduce and distribute
' the Sample Application Files (and/or any modified version) in any way
' you find useful, provided that you agree that Microsoft and the author
' have no warranty, obligations or liability for any Sample Application Files.
' ------------------------------------------------------------------------

'********************************************************************
'*
'* File:           PinItem.vbs
'* Date:           03/04/2009
'* Version:        1.0.2
'*
'* Main Function:  VBScipt to pin an item to the Start Menu or Taskbar
'*
'* Usage:  cscript PinItem.vbs /item:<path to exe>
'*                 [/taskbar] [/?]
'*
'* Copyright (C) 2009 Microsoft Corporation
'*
'* Revisions:
'*
'* 1.0.0 - 04/03/2008 - Created.
'* 1.0.1 - 03/02/2009 - Used Replace in PinItem function to remove "&" 
'*                      from verb.
'* 1.0.2 - 03/04/2009 - Script name was PinToStartMenu.vbs.  Added 
'*                      /taskbar switch to pin items to taskbar on
'*                      Win7.
'*
'********************************************************************


'*****************************************************************************
'* Declare Variables
'*****************************************************************************

Option Explicit
'On Error Resume Next

Dim blnPinned
Dim blnTaskbar

Dim i
Dim intOpMode

Dim objWshShell
Dim objFSO
Dim objShell

Dim strPath
Dim strArguments
Dim strOptionsMessage

' Define constants
Const CONST_ERROR               = 0
Const CONST_WSCRIPT             = 1
Const CONST_CSCRIPT             = 2
Const CONST_SHOW_USAGE          = 3
Const CONST_PROCEED             = 4
Const CONST_STRING_NOT_FOUND    = -1
Const CONST_FOR_READING         = 1
Const CONST_FOR_WRITING         = 2
Const CONST_FOR_APPENDING       = 8
Const CONST_Success             = 0
Const CONST_Failure             = 1

Const TRISTATE_USE_DEFAULT      = -2
Const TRISTATE_TRUE             = -1  'Open the file as Unicode. 
Const TRISTATE_FALSE            = 0   'Open the file as ASCII. 

blnTaskbar = False

'*****************************************************************************
'* Create Objects
'*****************************************************************************

Set objWshShell = CreateObject("Wscript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Shell.Application")


'********************************************************************
'* Check script host exe and parse command line
'********************************************************************

'Get the command line arguments
For i = 0 to Wscript.arguments.count - 1
    ReDim Preserve arrArguments(i)
    arrArguments(i) = Wscript.arguments.item(i)
Next

'Check whether the script is run using CScript
Select Case intChkProgram()
    Case CONST_CSCRIPT
        'Do Nothing
    Case CONST_WSCRIPT
        WScript.Echo "Please run this script using CScript." & vbCRLF & _
            "This can be achieved by" & vbCRLF & _
            "1. Using ""CScript MODIFYUSERS.vbs arguments"" for Windows 95/98 or" & VbCrLf & _
            "2. Changing the default Windows Scripting Host setting to CScript" & vbCRLF & _
            "    using ""CScript //H:CScript //S"" and running the script using" & vbCRLF & _
            "    ""MODIFYUSERS.vbs arguments"" for Windows NT."
        WScript.Quit
    Case Else
        WScript.Quit
End Select

'Parse the command line
Err.Clear()
intOpMode = intParseCmdLine(arrArguments, strPath, blnTaskbar, strOptionsMessage)

If Err.Number Then
    Wscript.Echo "Error 0X" & CStr(Hex(Err.Number)) & " occurred in parsing the command line."
    If Err.Description <> "" Then
        Wscript.Echo "Error description: " & Err.Description & "."
    End If
    'WScript.quit
End If

Select Case intOpMode
    Case CONST_SHOW_USAGE
        Call ShowUsage()
        WScript.quit
    Case CONST_PROCEED
        'Do nothing.
    Case CONST_ERROR
        WScript.quit
    Case Else
        Wscript.Echo "Error occurred in passing parameters."
End Select


'********************************************************************
'* Main Script
'********************************************************************

WScript.Echo strOptionsMessage

blnPinned = PinItem(strPath, blnTaskbar)
WScript.Echo "Item pinned: " & CStr(blnPinned)

If blnPinned Then
    WScript.Quit(0)
Else
    WScript.Quit(1)
End If


'********************************************************************
'*
'* Function intChkProgram()
'*
'* Purpose:  Determines which program is used to run this script.
'*
'* Input:    None
'*
'* Returns:  intChkProgram is set to one of CONST_ERROR, CONST_WSCRIPT,
'*           and CONST_CSCRIPT.
'*
'********************************************************************
Private Function intChkProgram()

    ON ERROR RESUME NEXT

    Dim i
    Dim j
    Dim strFullName
    Dim strCommand

    'strFullName should be something like C:\WINDOWS\COMMAND\CSCRIPT.EXE
    strFullName = WScript.FullName
    If Err.Number then
        Wscript.Echo "Error 0x" & CStr(Hex(Err.Number)) & " occurred."
        If Err.Description <> "" Then
            Wscript.Echo "Error description: " & Err.Description & "."
        End If
        intChkProgram =  CONST_ERROR
        Exit Function
    End If

    i = InStr(1, strFullName, ".exe", 1)
    If i = 0 Then
        intChkProgram =  CONST_ERROR
        Exit Function
    Else
        j = InStrRev(strFullName, "\", i, 1)
        If j = 0 Then
            intChkProgram =  CONST_ERROR
            Exit Function
        Else
            strCommand = Mid(strFullName, j+1, i-j-1)
            Select Case LCase(strCommand)
                Case "cscript"
                    intChkProgram = CONST_CSCRIPT
                Case "wscript"
                    intChkProgram = CONST_WSCRIPT
                Case Else       'should never happen
                    Wscript.Echo "An unexpected program is used to run this script."
                    Wscript.Echo "Only CScript.Exe or WScript.Exe can be used to run this script."
                    intChkProgram = CONST_ERROR
            End Select
        End If
    End If

End Function


'********************************************************************
'*
'* Function intParseCmdLine()
'*
'* Purpose:  Parses the command line.
'*
'* Input:    arrArguments              An array containing input from the command line
'*
'* Input:    strPath                   Path of exe to pin
'*           strOptionsMessage         String containing options selected
'*
'* Returns:  intParseCmdLine is set to one of CONST_ERROR, CONST_SHOW_USAGE,
'*           and CONST_PROCEED.
'*
'********************************************************************
Private Function intParseCmdLine(arrArguments, strPath, blnTaskbar, strOptionsMessage)

    ON ERROR RESUME NEXT

    Dim i
    Dim strFlag
    Dim strSwitchValue
    
    strFlag = arrArguments(0)
    Err.Clear()

    'Help is needed
    If (strFlag = "") OR (strFlag="help") OR (strFlag="/h") OR (strFlag="\h") OR (strFlag="-h") _
        OR (strFlag = "\?") OR (strFlag = "/?") OR (strFlag = "?") OR (strFlag="h") Then
        intParseCmdLine = CONST_SHOW_USAGE
        Exit Function
    End If

    strOptionsMessage = strOptionsMessage & ""  & VbCrLf
    strOptionsMessage = strOptionsMessage & WScript.ScriptName  & VbCrLf
    strOptionsMessage = strOptionsMessage & ""  & VbCrLf
    strOptionsMessage = strOptionsMessage & "Command Line Options:"  & vbCrLf
    strOptionsMessage = strOptionsMessage & "======================================="  & VbCrLf

    For i = 0 to UBound(arrArguments)
        strFlag = Left(arrArguments(i), InStr(1, arrArguments(i), ":")-1)
        If Err.Number Then            'An error occurs if there is no : in the string
            Err.Clear
            Select Case LCase(arrArguments(i))
                Case "/q"
                    blnQuiet = True
                    strOptionsMessage = strOptionsMessage & "Supress Console Output: " & blnQuiet & VbCrLf
                Case "/taskbar"
                    blnTaskbar = True
                    strOptionsMessage = strOptionsMessage & "Pin to Taskbar instead of Start Menu: " & blnTaskbar & VbCrLf
                Case Else
                    Wscript.Echo arrArguments(i) & " is not recognized as a valid input."
                    intParseCmdLine = CONST_ERROR
                    Exit Function
            End Select
        Else
            strSwitchValue = Right(arrArguments(i), Len(arrArguments(i))-(Len(strFlag)+1))
            Select Case LCase(strFlag)
                Case "/item"
                    strPath = strSwitchValue
                    strOptionsMessage = strOptionsMessage & "Item to pin to Start Menu or Taskbar: " & strPath & VbCrLf
                Case else
                    Wscript.Echo "Invalid flag " & strFlag & "."
                    Wscript.Echo "Please check the input and try again."
                    intParseCmdLine = CONST_ERROR
                    Exit Function
            End Select
        End If
    Next

    If (strPath = "") Then
        Wscript.Echo "The /item switch is required"
        Wscript.Echo "Please check the input and try again."
        intParseCmdLine = CONST_ERROR
        Exit Function
    End If

    intParseCmdLine = CONST_PROCEED

End Function


'********************************************************************
'*
'* Function PinItem()
'*
'* Purpose:  Pin item to the Start Menu.
'*
'* Input:          strlPath          Path of exe to pin
'*                 blnTaskbar        Pin item to Taskbar instead of Start Menu if true
'*
'* Dependencies:   objShell          Shell.Application object
'*                 objFSO            File System object
'*
'* Returns:        True if the shortcut is created, else false
'*
'********************************************************************
Function PinItem(strlPath, blnTaskbar)
    On Error Resume Next

    Dim colVerbs
    Dim itemverb
    
    Dim objFolder
    Dim objFolderItem

    Dim strFolder
    Dim strFile

    If objFSO.FileExists(strlPath) Then
        '***** Do nothing, folder exists
    Else
        '***** Folder does not exist
        PinItem = False
        WScript.Echo "File to pin does not exist."
        WScript.Echo "Please check the input and try again."
        Exit Function
    End If

    strFolder = objFSO.GetParentFolderName(strlPath)
    strFile = objFSO.GetFileName(strlPath)

    WScript.Echo "Folder: " & strFolder
    WScript.Echo "File: " & strFile

    Err.Clear
    Set objFolder = objShell.Namespace(strFolder)
    Set objFolderItem = objFolder.ParseName(strFile)

    ' ***** InvokeVerb for this does not work on Vista/WS2008
    'objFolderItem.InvokeVerb("P&in to Start Menu")

    ' ***** This code works on Vista/WS2008
    Set colVerbs = objFolderItem.Verbs

    If blnTaskbar Then
        For each itemverb in objFolderItem.verbs
            If Replace(itemverb.name, "&", "") = "Pin to Taskbar" Then itemverb.DoIt
        Next 
    Else
        For each itemverb in objFolderItem.verbs
            If Replace(itemverb.name, "&", "") = "Pin to Start Menu" Then itemverb.DoIt
        Next 
    End If

    If Err.Number = 0 Then
        PinItem = True
    Else
        PinItem = False
    End If
End Function


'********************************************************************
'*
'* Sub ShowUsage()
'*
'* Purpose:   Shows the correct usage to the user.
'*
'* Input:     None
'*
'* Output:    Help messages are displayed on screen.
'*
'********************************************************************
Sub ShowUsage()
    WScript.Echo "This script is used to Pin items to the Start Menu or Taskbar."
    WScript.Echo ""
    WScript.Echo "Usage: cscript " & WScript.ScriptName & " [options]"
    WScript.Echo ""
    WScript.Echo "Options:"
    WScript.Echo ""
    WScript.Echo " /item:<PathName>       Path of item to pin."
    WScript.Echo ""
    WScript.Echo " /taskbar               (Optional) Pin to Taskbar instead of Start Menu."
    WScript.Echo ""
    WScript.Echo " /?                     (Optional) Displays this help text."
    WScript.Echo ""
    WScript.Echo ""
    WScript.Echo ""
End Sub

 

MDT 2013:

On your MDT 2013 DeploymentShare$, add an application by right clicking the “Applications” node and selecting “New Application”

Image

In the new dialogue box, select “Application without source files or elsewhere on the network” radius button.

Image

Select Next and fill out the information as you would like it to appear (I choose to name my Application as “Set_TaskBar_&_StartMenu_Shortcuts” but it’s up to you.  If you use something else, then change the first script above accordingly)

Select Next, then in the Command Line field type “Copy_To_Default_User_Startup.cmd”

In the “Working directory” field, type: “.\Applications\Set_TaskBar_&_StartMenu_Shortcuts”

Image

Select Next, then Finish.

Now, right click your newly created application and select properties

Select the check box on the bottom left hand corner of the “General” tab that says “Hide this application in the Deployment Wizard”

Next, add all the scripts above to your %DeployRoot%\Applications\Set_TaskBar_&_StartMenu_Shortcuts folder.

After adding the scripts to this folder, go back to the Deployment Workbench and right click your Task Sequence for Windows 7 and select Properties

Under the State Restore section of the Task Sequence, add a “Custom Task” after your “Install Applications” item in the Task Sequence.

You can add the “Custom Task” in many different ways but I like to create a “New Group” after either my “Install Applications” or “Windows Update (Post-Application Installation)”:  Please see below:

Image

After creating the “New Group” you can name it anything but I choose to name mine as “Custom Task”.

Next, you need to add the application to your Task Sequence by selecting the “New Group” and clicking on Add->General->Install Application.

Configure your new Application as the screenshot

MDT2013_New_Application_5

Press Apply, then Ok.

When ever I make changes to my DeploymentShare I always update my Deployment Share for safe measures.  It’s also because I never want to forgot to do it when I really need too.

You should now have a new application that will set the Task Bar and your Start Menu Shortcuts without having to set them in your base image.

 

Enjoy!

p.s. I know there is probably a better way of organizing these scripts but in a pinch they worked and I haven’t gone back to look at other ways of doing it.