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