Copy Shortcuts to the Windows 7 Taskbar using MDT
-
Friday, November 09, 2012 7:26 PM
I would like to copy items to the Windows 7 taskbar for all users, and do this during deployment as part of a task sequence. Does anyone know if this can be done. I found a script called pinItem.vbs, but do not know if it could be done from a TS, nor how it would be.
All Replies
-
Friday, November 09, 2012 8:57 PM
This can be done by running a custom script. I suggest posting a question in the Scripting Guys Forum on how to write the script.
There are plenty of samples in the script repository.
Blog: http://scriptimus.wordpress.com
-
Friday, November 09, 2012 9:41 PM
Task Bar is a per user setting. Not same account that is running a task sequence. You need to run a script under a user who you are setting this for.
a. Use active setup and run a script under user.
b. run the script and then capture an image. Set copyprofile=TRUE
that will keep the setting for default profile
then deploy that captured wim file.
-
Saturday, November 10, 2012 4:53 PM
Hi Scott,
I would recommend this script: http://gallery.technet.microsoft.com/ScriptCenter/b66434f1-4b3f-4a94-8dc3-e406eb30b750/
It's a poweshell module that allows you to pin, items to both the task bar and start menu during your reference image build task sequence.
It's very simple to use this with MDT 2012 U1. Simply place the module in the folder {deploymentshare}\Tools\Modules\PinnedApplications\PinnedApplications.psm1
Then for example create a powershell "script" that looks something like this:
Import-Module PinnedApplications.psm1 Set-PinnedApplication -Action PinToStartMenu -FilePath "C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Internet Explorer.lnk" Set-PinnedApplication -Action PinToTaskbar -FilePath "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Outlook 2010.lnk"
Since the module is placed in the Tools\Modules folder, MDT can find this module easily during deployment without needing to specify a path where the module can be found.
Now the most important part of everything.
Whether it's SCCM or MDT that you use to deploy your custom image, you need to edit the unattend.xml of the task sequence that is used to >>>Deploy<<< the image. The default user profile is copied upon first boot after the image is applied, and not during the sysprep execution of your task sequence before your image is captured.
The CopyProfile setting is not enabled by default with the unattend.xml files created by MDT or SCCM, you will need to use WSIM to add this entry, more info can be found here: http://technet.microsoft.com/en-us/library/ff716261.aspx
Dispite the article saying you cannot pin applications to start menu and task bar (and this is normally true if you do these tasks manually, then these items will not persist in the new user profile), this scripted method actually does work.
Kind regards,
Stephan Schwarz
If one of these posts answered your question or issue, please click on "Mark as answer".
My Blog | Twitter: @Schwarz_Stephan | MCTS, MCITP, MCSA, MCC-2011.
How to configure Windows RE/OEM Recovery Partition with MDT
How to configure Windows RE/OEM Recovery Partition with MDT 2012 Update 1- Edited by Stephan Schwarz Saturday, November 10, 2012 4:55 PM
- Marked As Answer by Scott 43 Sunday, November 11, 2012 5:39 PM
- Unmarked As Answer by Scott 43 Sunday, November 11, 2012 7:31 PM
- Marked As Answer by Scott 43 Monday, November 12, 2012 2:09 AM
-
Sunday, November 11, 2012 5:32 PMThanks Stephen. I have one last question on implementing this. Do I modify the script directly with the items I want pinned, or do I need to call the script with parameters? Or does the script even need to be called as it is in the modules folder, and you said that MDT looks in that folder?
-
Sunday, November 11, 2012 8:09 PM
You still need to create a powershell script that calls upon the functions of the powershell module. Hence the import-module command.
So take my example as a powershell script, save it as a .ps1 file and place it on a place where you save your custom scripts. I generally tend to separate default mdt scripts and my custom ones by creating a subfolder in the \scripts directory. Using this as example, you could save the file as pinapplications.ps1 at deploymentshare\scripts\custom\ and then add a task in the task sequence to run a powershell script, at the following path %scriptroot%\custom\pinapplications.ps1
Kind regards,
Stephan Schwarz
If one of these posts answered your question or issue, please click on "Mark as answer".
My Blog | Twitter: @Schwarz_Stephan | MCTS, MCITP, MCSA, MCC-2011.
How to configure Windows RE/OEM Recovery Partition with MDT
How to configure Windows RE/OEM Recovery Partition with MDT 2012 Update 1- Marked As Answer by Scott 43 Monday, November 12, 2012 2:09 AM
-
Monday, November 12, 2012 12:57 AMIt is possible to add a few via unattend. i pin outlook, chrome, and firefox. I then use a script to clean up the default from start and taskbar.
-
Monday, November 12, 2012 2:46 AM
It is possible to add a few via unattend. i pin outlook, chrome, and firefox. I then use a script to clean up the default from start and taskbar.
Yes, you can use the unattend.xml to pin up to 4 items to the task bar. However, you cannot use this to pin items to the start menu, the only thing you can configure using the unattend.xml and the start menu is the so called "frequently run programs list", also up to 4 items; these items however are not pinned. So if you want more options available for your profile customization you will need to look elsewhere than the unattend.xml.
Kind regards,
Stephan Schwarz
If one of these posts answered your question or issue, please click on "Mark as answer".
My Blog | Twitter: @Schwarz_Stephan | MCTS, MCITP, MCSA, MCC-2011.
How to configure Windows RE/OEM Recovery Partition with MDT
How to configure Windows RE/OEM Recovery Partition with MDT 2012 Update 1 -
Wednesday, November 14, 2012 6:25 PM
Does it matter what phase of the capture task sequence that I place this? I had it right at the very begining, and it did not work.
-
Wednesday, November 14, 2012 9:12 PM
Anywhere in the [State Restore] section will do, I tend to do my customization after Windows Updates has been executed, but that's my opinion :).
Kind regards,
Stephan Schwarz
If one of these posts answered your question or issue, please click on "Mark as answer".
My Blog | Twitter: @Schwarz_Stephan | MCTS, MCITP, MCSA, MCC-2011.
How to configure Windows RE/OEM Recovery Partition with MDT
How to configure Windows RE/OEM Recovery Partition with MDT 2012 Update 1

