Mike's Tech Head Blog

What’s a Tech-Head? Well, hard to explain, but they do use technology where ever it is possible, even if it is not very smart or even needed…

Google Ads

On My Twitter now...

Loading...

News

Tags

Community

Recent Posts

Archives

Recommended Links

Email Notifications

MDT2010 – Publish Windows 7 upgrade/refresh using Group Policy’s

This time it will be fun. There is one thing that many people do not know and that is the fact that you can run the LiteTouch script directly from with in the OS and there seems to be only a handful of people that knows you can use command line parameters using that LiteTouch.vbs script file. So in reality, what does this really mean. Well.

So the feature is not “hidden”, its just so common for people to use it for some reason, I think that in refresh/upgrade scenarios its perfect. That way I can have one settings in customsettings.ini that works nice with “Baremetal Install” and then have command lines for doing refresh/upgrade’s. So if you look in the help file for MDT you can search for settings that you can do to make the install silent and automatic, lets say that you want to use skip the task sequence page, in that case it will be similar to this in customsettings.ini:

SkipTaskSequence=YES
TaskSequenceID=TS01

and similar to this in a command line form:

\\server\deploymentshare$\scripts\litetouch.vbs /SkipTaskSequence:YES /TaskSequenceID:TS01

As you can see, we need to add a slash before every variable and replace the equal sign with a colon

So, as an example, here is how to publish an icon to the desktop for the user to click on and it will then install Windows 7. First we need to create a CMD file, the file will then be published using a GPO: The file content is listed below, but you need to modify parameters or add/remove stuff that you do not need for your environment. For example, it is unlikely that your Task Sequence for Windows 7 Enterprise has an unique ID of WC001 :-)

Creating a CMD file on the deployment server

  1. Log on to the deployment server
  2. Create a new share \\SERVERNAME\Public
  3. Create “WindowsXP2Windows7.cmd” in that share, it should look like this:

    @Echo off
    CLS
    REM Let's delete the old shortcut on the desktop first so that we do not keep it after the refresh/upgrade
    del "%allusersprofile%\desktop\Upgrade this computer to windows 7.lnk"
    REM Let's deploy the OS now
    REM Note, this should all be in the same row, but i need to “bend” it so you can see
    \\SERVERNAME\deploymentshare$\Scripts\LiteTouch.vbs /SkipTaskSequence:YES
    /TaskSequenceID:WC001 /SkipDeploymentType:Yes
    /DeploymentType:REFRESH /SkipComputerName:YES
    /SkipDomainMembership:YES /UserDataLocation:AUTO
    /SkipUserData:YES /SkipComputerBackup:YES /ComputerBackupLocation:NONE
    /SkipLocaleSelection:YES /SkipApplications:YES /SkipAdminPassword:YES
    /AdminPassword:TheLocalPassword1
    /SkipBitLocker:YES /SkipSummary:YES /FinishAction:REBOOT

Using Group Policy to publish the CMD file to the users desktop

  1. Logon on to the DC
  2. Start Group Policy Management Console
  3. Create a new Policy Called “Upgrade to Windows 7”
  4. Open Computer / Preferences / Shortcuts
    image
  5. Create a new Shortcut using the following settings under the General TAB
    1. Name: Upgrade this Computer to  Windows 7
    2. Target type: File System Object
    3. Location : All Users Desktop
    4. Target Path: \\SERVER\Public\WindowsXP2Windows7.cmd
    5. Run: minimized
    6. Icon file path: %SystemRoot%\system32\SHELL32.dll
    7. Icon Index : 137
      image
  6. Modify the new shortcut under the Common TAB according to the following:
    1. Remove this item when it is no longer applied
    2. Item-Level Targeting
      image
      Under targeting you can set your conditions for computers to receive this shortcut, this for example is my settings:
      image

Now, on the Windows XP test box that you have, run GPupdate /force and verify that the Shortcut is popping up, and then run it. If you get questions you would like to avoid, set the parameters in customsettings.ini/MDT database or add them to the command line.

So, that's it. Only thing you need to do now is to relax and let the users refresh their own boxes…

/mike