Sorry for not posting this earlier but I have had a rough last couple months. Just now getting back into the swing of things.
When running sysprep in Windows 7 with the unattend.xml file, you will probably notice that the taskbar icons are something that don’t copy over. Well that is because the icons are not part of the users profile. So the copyprofile=true command does work for almost everything, but it doesn’t copy over your taskbar icons.
Thankfully the “Deployment Guys” already have a VBS script that will pin and unpin icons. I have edited this script and done most of the hard work for you. Basically we are going to dump a few scripts into the “startup folder” (and yes I said startup folder, it is messy but it works and finishes clean) which will run only the first time every new user logs in. It will pin the icons you want, in any order you want, both to the taskbar and the startmenu and then the script is deleted from the startup folder and never runs again for that user. It does work perfectly and I currently am using this in a corporate environment with around 400-500 computers.
Download the scripts that I have packaged together. Click here to download. Again, most of these scripts were written by The Deployment Guys, I have just tweaked them and added a few. It is a 35mb zip file.
The zip file contains the following files:
You are going to drop these scripts into the correct places during audit mode.
Copy the taskbar.bat file into the startup folder in the start menu.
Below is an explanation of what that taskbar.bat file is doing:
This changes the directory to the scripts folders.
Calls the cmd file which unpins and pins the taskbar icons.
cd C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup”
This changes the directory to the startup folder.
This deletes the taskbar.bat after it is done, so it won’t run again for that user.
The taskbar_operations.cmd file is the file that has all the custom icon paths in it that are pinned or unpinned.
My file has the following in this order:
Windows Explorer, IE, Firefox, Word, Excel, Outlook, WMP
If you want to change these, simply look in the cmd file and you will figure out what you need to change, it is pretty simple. Also, the default order when running sysprep is WMP, IE, and Windows Explorer, so the script is actually unpinning WMP, unpinning IE, (windows explorer is now bumped over to the left side) and then it pins the rest of the icons in order.
Create a “scripts” folder in the C:\Windows directory and drop all of the files into it, except for the taskbar.bat file which you should already have in your startup folder.
Now run sysprep as you normally would and the scripts are copied into the default profile. That means for every new user, the scripts pin the icons in the order you want, the script then deletes itself and never runs again. For the correct procedure on sysprepping your machine, read my Windows 7 Sysprep Tutorial.
I am definitely not a programmer, but this works, and I don’t see Microsoft giving us a better solution :).