none
VB Script for Pinned Site Shortcuts? RRS feed

  • Question

  • I have tried everything i can think of to either convert my old shortcut script or create a new one, so that i can make Pinned Site Shortcuts (.website) for the desktop of Windows 7 users. I have seen some scripts that place them on the Start Screen of Windows 8, but that is not exactly what I need.

    Here is the current script I am using

    Set wsc = WScript.CreateObject("WScript.Shell")
    Set lnk1 = wsc.CreateShortcut(wsc.SpecialFolders("desktop") & "\.LNK")
    Set lnk2 = wsc.CreateShortcut(wsc.SpecialFolders("desktop") & "\.LNK")
    Set lnk3 = wsc.CreateShortcut(wsc.SpecialFolders("desktop") & "\.LNK")
    lnk1.targetpath = ""
    lnk1.description = ""
    lnk1.save
    lnk2.targetpath = ""
    lnk2.description = ""
    lnk2.save
    lnk3.targetpath = ""
    lnk3.description = ""
    lnk3.save

    • Moved by Bill_Stewart Thursday, January 2, 2014 7:22 PM Abandoned
    Friday, November 1, 2013 2:29 PM

All replies

  • .website shortcuts appear to be INI-style text files similar to .url shortcuts, but containing a lot more information.

    I searched around a bit, and even on MSDN, did not find any way to programatically create a new .website file.  Microsoft's documentation for deploying pinned sites says to just create it manually from IE (by dragging the site's icon somewhere), then deploying the resulting .website file.

    Unfortunately, the extra fields in the .website files don't always have terribly useful names (Prop5=3,0 , Prop9=19,0, etc), so it's hard to say whether you'd be able to reliably build these files yourself.  You could try creating pinned sites manually and comparing the contents of the .website files; perhaps you might find out what they mean, and what they should be set to by your script.

    Here are the .url and .website versions of this forum thread, for example:

    # VB Script for Pinned Site Shortcuts.url
    
    [{000214A0-0000-0000-C000-000000000046}]
    Prop3=19,2
    [InternetShortcut]
    URL=http://social.technet.microsoft.com/Forums/scriptcenter/en-US/7a582a1e-4255-42ca-9b3b-85fac8d2baff/vb-script-for-pinned-site-shortcuts?forum=ITCG
    IDList=
    
    # VB Script for Pinned Site Shortcuts.website
    
    [{000214A0-0000-0000-C000-000000000046}]
    Prop4=31,VB Script for Pinned Site Shortcuts?
    Prop3=19,2
    [{A7AF692E-098D-4C08-A225-D433CA835ED0}]
    Prop5=3,0
    Prop9=19,0
    [InternetShortcut]
    URL=http://social.technet.microsoft.com/Forums/scriptcenter/en-US/7a582a1e-4255-42ca-9b3b-85fac8d2baff/vb-script-for-pinned-site-shortcuts?forum=ITCG
    IDList=
    IconFile=http://i4.social.s-msft.com/Forums/GlobalResources/images/Technet/favicon.ico
    IconIndex=1
    [{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}]
    Prop5=8,Microsoft.Website.B4BD2547.EE10FEE4
    

    Friday, November 1, 2013 3:13 PM
  • I see what you mean. The file type is fairly new, so there just isn't a lot of documentation out there. I will keep working on it. Your example was incredibly helpful, thanks!
    Friday, November 1, 2013 4:04 PM