Very much a place-holder for now but I thought my Windows command-line tool PinTo10v2 could do with a home page…

A lot of IT admins will know that the popular VB Script that pins items to the Windows 7 Task Bar and Start Menu does not work in Windows 10.  I made PinTo10 about 18 months ago based on the Nullsoft Scriptable Installer framework which was functional but slow and heavy for a command-line tool and not really the right tool for the job at all.  Now, based on some great work by Alex Weinberger ( ), I’ve made PinTo10v2 which has the same functionality as the original but is a fraction of the size and far more efficient. The source code isn’t very pretty as I’m no c# coder (I normally stick to basic scripting) but it works.

Give it a go, source code included…

Stuart Pearson




16 thoughts on “PinTo10v2”

    1. Rob, Sadly not. This method still uses the verb method (with a little modification for it to work on Windows 10 thanks to Alex Weinberger). As the default pinning of Edge doesn’t seem to actually directly link to a .lnk or .exe that verb can’t be triggered. The best methods available at the moment seem to be importing a set of registry keys to HKCU for a basic “taskband” and restarting explorer.exe. Then you can pin whichever icons you want back. It’s not pretty but it’s probably the best solution at this point in time.


  1. Hello Stuart
    What is the reason that your (very nice) tool doesn’t work on Server OS, for example Server 2016?
    Ever since I discovered this tool we’ve been using it for our Windows 10 deployments. Now I wanted to also use it for Server 2016 but apparently it’s not supported.


    1. Hi Mike,

      Only Windows 7 and 10 are supported because those are the OS’s that have been tested and are known to work. This is why I’ve provided the source code for it.

      If you look at line 71 of Program.cs you’ll see that it exits the program if it doesn’t detect Windows 7 or 10. You should simply be able to change that line from…

      actionIndex = pin ? 51201 : 51394;

      and then recompile it.

      This should work (completely untested)…


      Liked by 2 people

      1. So is the correct syntax something like this:

        PinTo10v2_NoOSCheck.exe /pintb ‘’
        PinTo10v2_NoOSCheck /pintb ‘C:\Program Files\\paintdotnet.exe’
        PinTo10v2_NoOSCheck /pintb ‘C:\Program Files\\paintdotnet.lnk’



      2. Hi,


        PinTo10v2_NoOSCheck /pintb “C:\Program Files\\paintdotnet.exe”
        PinTo10v2_NoOSCheck /pintb “C:\Program Files\\paintdotnet.lnk”

        … should work as long as the file exists. Full paths are needed (although I appreciate that I only put “filename” in the help file.

        Please note that the NoOSCheck might operate differently or not at all on OS’s that are not Win 7 or 10 so if something isn’t working (and you’re not using Win 7 or 10) then please try it on a “supported” operating system first.



  2. Stuart: I know the source is included, but could you include a license statement to clarify how your (nice) work can be used? Thanks.


    1. Feel free to link back to this site and this statement. I’m no lawyer and don’t know how open source really works but I am providing the compiled exe and source code available to everyone to use with no suggestion that this is fit for purpose or comes with any expression of support or warranty. Please use at your own risk. I have tested it and know it to work as I intended. As it is based on someone else’s source code you would have to also check that they are also happy for the code to be used.


  3. Hey there, I have used this tool 2 times until now and it all worked fine until now. I am trying to pin a folder link (same happens with and .exe or application link) to the start menu of Windows 10 1607 (via CMD command, but it gives the same error with PS as well) and it fails with the following description:
    Unbehandelte Ausnahme: System.UnauthorizedAccessException: Der Zugriff auf den Pfad “C:\ProgramData\Microsoft\Windows\Start Menu\Programme” wurde verweigert.
    bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    bei System.IO.FileSystemEnumerableIterator`1.AddSearchableDirsToStack(SearchData localSearchData)
    bei System.IO.FileSystemEnumerableIterator`1.MoveNext()
    bei System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
    bei System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
    bei PinTo10v2.Program.Main(String[] args)

    I would appreciate any help.


    1. Hi, support will be quite minimal (if any) but do you have the command line you’re trying to run?

      I didn’t test any folder shortcuts but looking at them then I think pinning them to the Start Menu may work but the verb to pin them to the taskbar doesn’t appear to be there by default. I also have no idea if this will work in any language than US / UK which is why I’ve provided the source.

      If you look at line 122 of Utils.cs you will see that it’s hard-coded to look at…
      string currentuserstart = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @”\Microsoft\Windows\Start Menu\Programs”;

      I would guess that the folder %APPDATA%\Microsoft\Windows\Start Menu\Programs doesn’t exist on a German system? This can be changed to whatever it should be and re-compiled in Visual Studio. Whilst you’re at it you could also fix a bug on line 233 of the same file which is currently…
      counter = counter = + 1;
      but should be…
      counter = counter + 1;

      As it stands it can go into an infinite loop.

      Hope this is of some help.


      The way I’m working on my deployments for this summer is going to be based on the update of a Powershell Cmddlet for applying a default Start Menu menu to new user to include the default TaskBar…



  4. Hi,
    I will look into it and get back with some results. I actually never used VS until now, but I will learn, not a problem.
    The reason for trying to use your app, is that in 1607 the XML does not pin Folders, and my Customers have that as a requirement.

    The command line for pinto I use is:
    path to pinto exe /pinsm “path to shortcut”
    Indeed I have tested it on US MUI and it works, so what do you suggest I do to add support for other languages, because my Customers are multinational, including Japanese and Chinese?

    I am following the other blog as well!



    1. Hi, if you modify the start menu path to point at special folder “startup” and traverse up a folder from there you will get the startmenu > programs from there on 100% of international OSes. BTW this app works on server 2012 and server 2016. I wish it could run faster but I am using it at our school to pin many things including control_panel>printers with windows 10 and it works very well, good job!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s