Pin Items to TaskBar during OSD in Windows 10 (1511)

Updated Method for 1607  HERE, this method below still works, but Nickolaj goes through the new built in export / import method available in 1607.

 

image

This one took me a little while.  The hard one was Internet Explorer, which I had to do completely differently than the others.

In this post I’ll give two ways to do it, the first way worked for all of them but Internet Explorer, and I was able to do natively without any “3rd” party tools.  The second way uses a Free Utility a community member wrote, which I was able to use to Pin Internet Explorer. Note, I was unable to remove Edge from the taskbar, still haven’t figured that one out yet.
The Scripts used are located HERE in the subfolder TaskBarPins

Method 1 - Registry Edit & File Copy – Using this to Pin the Office Icons

    1. Create your Folder for the Source Files on your ConfigMgr Source Share
    2. Pin all of the Items you want
    3. Copy the contents from %AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar to a Subfolder in your Source called TaskBar
      image
      image
    4. Export this KEY from the registry to your Source Folder: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband
      image
    5. Edit your exported Registry File, replace HKEY_Current_User with HKEY_LOCAL_MACHINE\defuser, so the string looks like:
      [HKEY_LOCAL_MACHINE\defuser\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband]
      image
    6. Create a Batch file that contains these lines: (This will mount the default profile keys and allow you to import your exported keys into the default user profile registry, and copy the shortcuts into the default user TaskBar location)

reg.exe load HKEY_LOCAL_MACHINE\defuser c:\users\default\ntuser.dat
reg.exe import "TaskBarPins\TaskBarPinItems-OfficeOWXP.reg"
reg.exe unload HKEY_LOCAL_MACHINE\defuser

xcopy TaskBarPins\TaskBar\*.lnk "C:\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"  /Q /Y /I
image

 

  1. Add Command Line Step in TS - cmd.exe /c TaskBarPins\TaskBarPinItems.cmd, referencing the Windows10 OSD Package
    image
    My Windows 10 OSD Package.  It contains all of the tweaks in one package, which is why in the command line, I have to reference the folder name, then the script.
    image

Method 2 - Using PinTo10.exe tool provided by community member – This was the only way I’ve been successful in getting IE to Pin to TaskBar.  Information was found here on Connect.Microsoft.Com – You can get the Utility referenced in that thread HERE – It will also be in the Download I provide with all of the Scripts HERE

    1. Create your Folder for the Source Files on your ConfigMgr Source Share (I’m using the same folder as the one created for Method 1), mine looks like:
      image
    2. Create a batch file with these contents call PinTo10-Setup.cmd (Sorry for word wrap)

reg.exe load HKEY_LOCAL_MACHINE\defuser c:\users\default\ntuser.dat
reg.exe ADD HKEY_LOCAL_MACHINE\defuser\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /v PinIE /T REG_SZ /D "c:\cabs\PinTo10IE.cmd" /F
reg.exe unload HKEY_LOCAL_MACHINE\defuser


xcopy "TaskBarPins\TaskBar\Internet Explorer.lnk" "c:\programdata\Microsoft\Windows\Start Menu\Programs\Accessories"  /Q /Y /I
xcopy "TaskBarPins\PinTo10IE.cmd" "c:\cabs\" /Y /S
xcopy "TaskBarPins\PinTo10.exe" "c:\cabs\" /Y /S

image

    1. Create a batch file with these contents called PinTo10IE.cmd:

echo off
ECHO Pinning Internet Explorer to TaskBar
c:\Cabs\PinTo10.exe /PTFOL01:"c:\programdata\Microsoft\Windows\Start Menu\Programs\Accessories" /PTFILE01:"Internet Explorer.lnk"
image

      1. Save those 2 Batch files & the PinTo10.exe you downloaded to your Source Folder, should like similar to my example in Method2 – Step1
      2. In the TS, add a command line Step: cmd /c TaskBarPins\PinTo10-Setup.cmd

, referencing the Windows10 OSD Package

image

Basically what’s happening, the Setup Script Adds a line to the RunOnce registry that will trigger a script to call the PinTo10 script on a users’s first logon.  It then copies the Shortcut it will PIN in the Taskbar to the ProgramData Folder, the PinTo10.exe Utility & PinTo10.cmd files to c:\Cabs. At first logon, you’ll see a command box popup while it’s doing the pin.  Then you’ll see Internet Explorer show up in the TaskBar.

image

image

image

 

If you like, you can modify the PinTo10.cmd file to include all of the items you wish to PIN, and do all of them in One step, I already had the Office Icons setup, so I didn’t bother changing everything over.

8 thoughts on “Pin Items to TaskBar during OSD in Windows 10 (1511)

  • April 20, 2016 at 7:04 am
    Permalink

    great post, how can I remove edge and the windows store?

    Reply
    • April 21, 2016 at 8:51 am
      Permalink

      Windows Store - Group Policy
      User Policy\Policies\Administrative Templates\Start Menu & Taskbar
      Do not allow pinning Store app to the Taskbar = Enabled
      Show Windows Store app on the taskbar = Disabled

      Edge - Haven't figured out a way to do that yet.

      Reply
  • May 13, 2016 at 3:25 pm
    Permalink

    I wish I saw this post while I was working on deploying Windows 10 with MDT. Method 2 is great but I found another tool that makes pinning a little less complicated.

    Its called Syspin and you can download it from the following link:
    Edit: Link Removed due to Terms of Linked Website.

    To pin IE, you can use the following command:
    syspin "%PROGRAMFILES%\Internet Explorer\iexplore.exe" c:5386

    I posted more info on my website:
    http://joseespitia.com/2016/05/13/how-to-programmatically-pin-icons-in-windows-10/

    I hope this helps!

    Hope this helps someone out there because I spent a lot of time trying to find a way.

    Reply
    • May 13, 2016 at 10:47 pm
      Permalink

      I actually looked at that tool before my post, but due to the terms, it didn't make sense to use, as I am using OSD an in enterprise. But if you're using it on your personal computers, it's a nifty tool. "Private Use Only" - Go to the site and look at the terms.
      - Like your Site, and thanks for the info about Edge, much appreicated

      Reply
  • May 19, 2016 at 4:23 am
    Permalink

    i get these error during OSD

    D:\_SMSTaskSequence\Packages\PR10009D>xcopy "PinTo10IE.cmd" "c:\cabs" /Q /Y /I

    Does C:\cabs specify a file name
    or directory name on the target
    and when i tried to run the cmd one on windows to check it, i get the error

    "Does C:\cabs specify a file name
    or directory name on the target
    (F = file, D = directory)?"

    any idea?

    Reply
    • May 19, 2016 at 6:49 am
      Permalink

      Try adding a step that create c:\cabs first.
      Or if you have a special folder on your computers you like to stage files in, use that.

      Reply
  • September 28, 2016 at 3:38 pm
    Permalink

    Hi Gary. I have been testing our 1607 upgrade task sequence and I've noticed that Edge gets re-pinned during that upgrade process, and I'm wondering if you've found a way to prevent that from happening. I would leverage the new 1607 group policy but unfortunately we are on Pro licenses, not Enterprise. For new builds I've been using the Jörgen method, but that won't really work for uprgades. Any thoughts?

    Reply
  • December 21, 2016 at 11:16 am
    Permalink

    Nice post, useful stuff. When I saw the screenshot of your Task Sequence with all the tweaks and then the scripts were in the ZIP file I was super happy.
    What made my day though was that the removedefaultaapps was actually taken from my website, and I was given credit.

    Cheers,
    JAW

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *