Wednesday, 21 July 2010

Pinning Icons to the Windows 7 Taskbar

The Deployment Guys posted an article a couple of months back on how to script pinning shortcuts to the Windows 7 Taskbar.

However, the scripting method won't work during an SCCM OSD deployment as the task sequence runs in the Local System context which has no shell access and the script depends on the Explorer shell because it is executing shell verbs.

So, there's another way:
You can copy icons to the C:\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar folder if you want to make them available to all profiles created AFTER you've copied icons into it.

This is handy I find when creating images as it allows for quick customisations to the taksbar that will affect all users loging onto the machine after it's had the image deployed to it and can easily be added as a "Run Command Line" task in an SCCM OSD Task Sequence.

If the folder doesn't exist (Doesn't by default if I remember correctly) then just create it. I also then set it to hidden like it is in a normal user profile, but I'm just a neat freak :P

Also, if you use a reference computer to set the icons in the order that you require, exporting the data from this registry key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband] will then allow you to re-import it into the default users profile to affect the icon order for all your users.


Anonymous said...

Hi Steve I'm very interested in how you are doing this. Do you think you can give more detailed instructions on how to configure this?


Steve Beaumont said...

The post fairly much said it all...
Copy any icons you want available to all new users logging on to the C:\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar folder

If you want to set the positioning order of the icons, setup a reference profile, order them, reboot, then export the registry key [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband]

Change any references to the HKEY_CURRENT_USER in the exported file to the name you will use for the Def user branch when you open/mount it.

e.g. If you mount the default user as DefUser then find HKEY_CURRENT_USER and replace with HKEY_USERS\DefUser

Then import this into the default user profile by loading the default user registry hive before import.

A command such as this can be used to mount the default user registry hive:

Import the file (Regedit /s /i Regfilenameandpath)

Then unload the hive:

All this can be scripted in MDT and/or SCCM.


Jeff said...

Hi Steve,

I've tried this solution of creating the User Pinned\TaskBar folder and adding shortcuts in here but they don't seem to show up in any new user profiles that are created after doing so. Are there specific attributes or permissions or anything that are required? In my Build and Capture sequence I have a VBS script create the folder and then create a Shortcut but no joy. Any suggestions? Thanks.

Ian Burnell said...

I am trying to do this via SCCM 2012. Simply copying the shortcuts into the Default user...\user pinned\taskbar doesn't appear to be enough. I have a feeling you may have to mount the default user hive ntuser.dat and import registry from a reference machine (taskband) - could you confirm this is the case?

Unknown said...

Hello nice game who loves to play game. really I'm very interested to you game system thanks.

Canegi said...

I was very fortunate to be able to visit your page.

Unknown said...

Thanks for your sharing
gclub มือถือ

gclub fever said...

special bonus of 100 percent, which means that if you deposit 1,000 baht for the first time, we will double it for you, which is 1,000 baht. The money will be transferred into your own user after signing casino online