Pin folder contents to Start Menu

Hello,
I know how to pin a single item to the start menu. I am using the following for a single item:
Function fPinToStart
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.NameSpace(strPinFrom)
Set objFolderItem = objFolder.ParseName("google.lnk")
wscript.echo objFolderItem.Name
For Each verb In objFolderItem.Verbs()
wscript.echo verb.name
If verb.Name = "Pin to Start Men&u" Then
verb.DoIt()
End If
Next
End Function
What I need to do though is take the contents of a folder and pin the contents to the start menu. The reason for this is we have 5 or 6 websites that need to easily be accessed on locked down systems. In order to make them easy to access we want to pin to
the start menu. I know I can create 5 or 6 functions but it seems like I should be able to take the contents of a folder and somehow parse that data so that it can run each item separately. I am using the below to read the contents of a folder. Is there a
way I can feed it into the above function so that each objFile can be looped through the For Each?
Function fPinToStartFolder
Set objShell = CreateObject("Shell.Application")
Set objFolder = objFSO.GetFolder(strPinFrom)
Set colFiles = objFolder.Files
For Each objFile in colFiles
wscript.echo objFile.Name
Next
End Function
The way I look at it is objShell.NameSpace(strPinFrom) and objFolder.ParseName("google.lnk") need to be dynamic so that fPinToStartFolder can feed the data into fPinToStart one file at a time. Ofcourse the names of the functions are messy. They will
change as I get a solution.

Thanks Bill. That got me to a solution for unpinning. Just need to make some changes to my pinning script and I am done. Here is the unpin. Modify it the way you need it for pinning
Function fGetUserPinnedStartMenu
fGetUserPinnedStartMenu = "C:\Users\" & strUserName & "\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu"
End Function
Function fGetFolderContents(objAppData)
wscript.echo "Pinned Icons Location: " & objAppData
Set objFolder = objFSO.GetFolder(objAppData)
Set colFiles = objFolder.Files
For Each objFile In colFiles
wscript.echo objFile.Name
fUnpinFromStart objFile.Name,objAppData
Next
End Function
Function fUnpinFromStart(objFile,objAppData)
wscript.echo "Unpinning " & objFile
Set objShell = CreateObject("Shell.Application")
Set objFolderUnpin = objShell.Namespace(objAppData)
Set objFolderItem = objFolderUnpin.ParseName(objFile)
For Each verb In objFolderItem.Verbs()
If verb.Name = "Unpin from Start Men&u" Then
verb.DoIt()
End If
Next
End Function
SET objNetwork = CreateObject("WScript.Network")
SET objFSO = CreateObject("Scripting.FileSystemObject")
SET WshShell = CreateObject("wscript.Shell")
strUserName = objNetwork.UserName
objAppData = fGetUserPinnedStartMenu
fGetFolderContents objAppData

Similar Messages

  • RDS 2012 App-V 5 SP2, Applications are not pinned in the Metro Start Menu

    Hey All,
    I've been building a new App-V 5 Environment using server 2012 R2 for the App-V management\Publishing\Reporting servers.
    I've installed app-v 5 SP2 on the RDS 2012 R2 servers and installed the App-V 5.1 SP1 Hotfix (KB2897087) for the 2012 R2 support.
    I have run into the following issue; When triggering a app-v publishing sync the applications are only added in the classic start menu. The applications aren't pinned in the Metro Start menu like our App-V sp1 RDS 2012 clients.
    I have checked the App-V client eventlogs (including the debug logs) and I haven't been able to find any errors that point out the cause of my issue.
    Has anyone experienced the same issue or has anyone got any tips to get the app-v 5 sp2 client on RDS 2012 R2 to pin the sequences to the Metro Start Menu?
    Thanks.

    This is the default behaviour of Windows 8.1 and Windows Server 2012 R2 - there are no programmatic ways to pin shortcuts to the Start screen.
    Here's a way to customise the Start screen layout: http://stealthpuppy.com/customizing-the-windows-8-1-start-screen-dont-follow-microsofts-guidance/
    Here's how to go it with Group Policy: http://www.grouppolicy.biz/2013/06/customising-windows-8-1-start-screen-layout-with-group-policy/
    Note that neither approach will help you pin shortcuts to the Start screen for users that have already logged on, without overwriting their existing preferences.
    Please remember to click "Mark as Answer" or "Vote as Helpful" on the post that answers your question (or click "Unmark as Answer" if a marked post does not actually
    answer your question). This can be beneficial to other community members reading the thread.
    This forum post is my own opinion and does not necessarily reflect the opinion or view of my employer, Microsoft, its employees, or other MVPs.
    Twitter:
    @stealthpuppy | Blog:
    stealthpuppy.com |
    The Definitive Guide to Delivering Microsoft Office with App-V

  • Start Menu Folder Redirection In Windows Server 2008 R2 (Via GPO) For Windows 7 Professional

    Hi,
    I'm having the problem where a redirected start menu appears empty. Using
    server 2008 R2 and the clients are Windows 7 Professional; i am getting empty start menu.
    Note:- Same is working perfectly fine with Windows
    XP machines.
    I believe the policy is set up correctly.
    Setting: Basic (Redirect everyone's
    folder to the same location)
    Path: \\10.x.x.x\redirection\StartMenu
    Options:
    Grant user exclusive rights to Start Menu - Disabled 
    Move the contents of Start Menu to the new location - Disabled 
    Also apply redirection policy to Windows 2000, Windows 2000 server, Windows XP, and Windows Server 2003 operating systems  - Enabled 
    Policy Removal Behavior - Leave contents
    Start Menu and Taskbar
    Policy
    Setting
    Comment
    Clear history   of recently opened documents on exit
    Enabled
    Clear the   recent programs list for new users
    Enabled
    Do not keep   history of recently opened documents
    Enabled
    Do not search   for files
    Enabled
    Lock all   taskbar settings
    Enabled
    Lock the   Taskbar
    Enabled
    Prevent   changes to Taskbar and Start Menu Settings
    Enabled
    Remove access   to the context menus for the taskbar
    Enabled
    Remove All   Programs list from the Start menu
    Enabled
    Remove common   program groups from Start Menu
    Enabled
    Remove Default   Programs link from the Start menu.
    Enabled
    Remove   Documents icon from Start Menu
    Enabled
    Remove   Downloads link from Start Menu
    Enabled
    Remove   Favorites menu from Start Menu
    Enabled
    Remove   frequent programs list from the Start Menu
    Enabled
    Remove Games   link from Start Menu
    Enabled
    Remove Help   menu from Start Menu
    Enabled
    Remove   Homegroup link from Start Menu
    Enabled
    Remove links   and access to Windows Update
    Enabled
    Remove Music   icon from Start Menu
    Enabled
    Remove Network   Connections from Start Menu
    Enabled
    Remove Network   icon from Start Menu
    Enabled
    Remove   Pictures icon from Start Menu
    Enabled
    Remove   programs on Settings menu
    Enabled
    Remove Recent   Items menu from Start Menu
    Enabled
    Remove Run   menu from Start Menu
    Enabled
    Remove Search   Computer link
    Enabled
    Remove Search   link from Start Menu
    Enabled
    Remove See   More Results / Search Everywhere link
    Enabled
    Remove the   Action Center icon
    Enabled
    Remove user   folder link from Start Menu
    Enabled
    Remove user's   folders from the Start Menu
    Enabled
    Remove Videos   link from Start Menu
    Enabled
    Please help !
    Regards Zargar Muneer

    Hi Zargar,
    >>Using server 2008 R2 and the clients are Windows 7 Professional; i am getting empty start menu.
    This is normal, for we disabled the option
    Move the contents of Start Menu to the new location. This option is enabled by default and it will automatically move the existing content to the new location.
    At this moment, we can manually copy the files we want from the local locations.
    Best regards,
    Frank Shen

  • IE11 favorites 'pinned to start menu' bug - not all of these sync between Surface RT and Surface 2

    answers.microsoft.com/en-us/surface/forum/surf2-surfgetstart/not-all-of-my-favorite-websites-that-were-pinned/
    Recently bought surface 2, originally pinned everything on Surface RT in windows RT, later upgraded to windows 8.1 RT
    Noticed only some of my favorite websites that were pinned to start sync'd over to the Surface 2. They were also out of order, but still in the same section of the start menu
    Didn't get anywhere on the other forums. Any tips here that might help?
    How does the start menu sync work?

    I'm pretty sure both of my surface's are already trusted devices.
    I sign in to both of them every day.
    First, the sync is not instant. There should be a way to force the sync... like a sync button.
    I tested this by moving some pinned things around AND changing the start background and then waiting for the other one to catch up with the start menu changes.
    The Journals / website pins to start are definitely bugged between the two devices. Not all of them sync.  I'm now in the process of doing a work-around.  Instead pinning them to a favorites bar folder AND the start menu... until this is resolved.
    It's pretty annoying and hope that Microsoft is looking in to it.
    EDIT:
    More info about the bug.  I re-pinned the website to start on the Surface 2 (which didn't originally sync over from the RT).  Now when I move it around on the Surface 2, it moves the same website, but different name on the start screen on the Surface
    RT.
    So it is detecting that it is the same website pinned, but the names are not syncing over.  It is like it is hidden, although it's not like there is a box missing... it re-organizes / collapses the order down to appear that it isn't missing multiple
    boxes.
    EDIT 2:
    When working on the work-around, after adding the website to a favorite bar, then going to the device that didn't sync, opening the page, then re-pinning it to start on the bugged sync device, it will insert the pin in the exact same spot on that device,
    even if you name it something else - you'd think it would go to the end, but it knows where it is supposed to go... even though the sync is bugged.
    I ran the troubleshooter linked here, but it just made a log. I put the result in the other forum:
    answers.microsoft.com/en-us/windows/forum/windowsrt8_1-desktop/not-all-of-my-favorite-websites-that-were-pinned/bfb697fd-70f0-4cd4-ba26-9e838bb51493">answers.microsoft.com/en-us/windows/forum/windowsrt8_1-desktop/not-all-of-my-favorite-websites-that-were-pinned/bfb697fd-70f0-4cd4-ba26-9e838bb51493

  • How do I move bookmarks from my list or in a folder to the Favorites connection in my Start menu

    I have a folder in my start menu named Favorites. When I click on it, it takes me to the list of bookmarked folders. When I open the folder I want, it shows some, but not all of the bookmarked sites in the folders. How do I add bookmarked sites to the folder so the open with Favorites?

    testing

  • Cannot create Folder and then add AppV sequenced apps in the Start menu

    Hi,
    I have managed to sequence the apps properly using the App-V 5.0 SP2 sequencer. But after adding the package and publishing it globally, when i mount the package in my App-V client machine, it creates a direct application shortcut in the Start menu. What
    I want is to create all the App-V sequenced apps in a Folder in start menu so that users do not get confused by the overwhelming list of apps. Please suggest if there is a way possible.
    Thanks!

    Hi 
    I managed to install App-V client on a new server and mount the package again.
    But still I can't seem to get it work the way I want. I want to see a Folder in the start menu hosting my App-V apps. Even though I have given the same setting in the APP-V management server, it still publishes the app directly in the start menu. I can't
    understand how else to test this. What am I missing? Pls point me correctly
    Ben
    De Vriese & Tiberivs
    Find some screenshots for better understanding the issue.
    Also when i try the Publishing server URL from my client machine or any machine, I get the below output. Has this got something to do with the problem I am facing? Is it able to load the changes that I am doing, any SQL permissions problem?
    <?xml version="1.0"?>
    -<Publishing Protocol="1.0">
    <Packages/>
    </Publishing>

  • ITunes 7 ...too good to be true... start menu folder problems

    If any one out there like me and prefers to keep there start menu / programs organized then you might run into this ... itunes 7 automatically installs itunes into the directory directly under start menu/programs....and if i try to move the folder into a sub-folder such as start-menu/programs/media folders ... itunes will reinstall itself and make another new folder under start-menu/programs .... this is quite upsetting

    hahahaha!
    It said my ipod update was complete. Then when I go to disconnect it, it says "itunes is updating the ipod. are you sure you want to disconnect it?"
    lol
    it appears to be ruiening all the tracks on my ipod with its gapless playback.
    looks like its time to uninstall iTunes 7, go back to the previous version, restor my ipod to factory settings and remove all the songs, then start over.
    I love apple "upgrades"

  • Start Menu Program Group/Folder Evaported

    OK, so I really tried to find hints in the forums & knowledge base, but I guess my search-fu just isn't up to it; thus apologies if this is boring:
    I'm running CS5 Design Premium on Windows 7 Home Premium x64; all are patched & up to date. I just noticed today that the start menu folder for Creative Suite is missing. I've tried exporing for it in the hard drive but it is missing there just like it is on the start menu. The applications are still installed and I can start them directly from their exectuables. It's just that the folder in the start menu has gone missing. I have no clue why or how long it has been, a few days at most.
    While I'd love to know how it happend, I'd be satisfied if if there was a "repair install" facility that will recreate it, short of actually reinstalling (and re-patching) the whole thing, which seems silly, or building one by hand, which seems tedious. The control panel "Programs and Features" entry seems only to be interested in uninstalling.
    FYI I also have Lightroom x64 and Premiere Elements installed, in the unlikely event that it matters.
    Thanks for any help anyone can provide,
    --Bob

    Well, yes, of course; this is what I meant when i said "building one by hand". But there's 14 links in there, several of which I would never have remembered. Many applications -- including ones that cost far less than CS -- have a "repair install" option that will go look for and fix any such breakage, and I was wondering if CS could do that, or if the only other option was in fact to fully uninstall the product, reinstall from distribution and re-download and apply all the patches. One solution (manual reconstruction) is highly error-prone, while the other (reinstall) is very time-consuming. I was lucky to have a filesystem backup, so that's a third solution but not one that will be available to everyone.
    --Bob

  • Pin shortcuts to Taskbar and Start Menu for all users in Windows 7

    How can i Pin shortcuts to Taskbar and Start Menu for All Users in Windows 7? Office 2007 Word, Excel and Outlook.

    There are a few ways...
    You can configure a default profile which will give you the ability to setup the Start Menu as you want it with the items pinned how you like.  However, in my experience customizations done to the Taskbar are not maintained in a default profile.
    So, one way to get around that would be to create a script and use the "Active Setup" hooks that are built into Windows 7 to achieve the desired results.
    If you combine this script...
    http://blogs.technet.com/deploymentguys/archive/2009/04/08/pin-items-to-the-start-menu-or-windows-7-taskbar-via-script.aspx
    With Active Setup...
    http://www.visualbasicscript.com/Active-Setup-Examples-m67461.aspx
    You can get the results you want to get...
    Pinned items on the Taskbar have two components, one is in the file system and the other is in the registry.  You could also use GPO Preferences to add both components to a new profile and therby get similar results.  I played around with this method a little and did get it to work also.
    Mike N.

  • Where are the shortcuts for the Programs in the start menu Jumplist located?

    I would like to change the target for Google Chrome and add a switch to Chrome.exe. I have to do this on about 200 computers, and I can't seem to find the Google Chrome.lnk file for the JumpList?

    Hi,
      The information about pinned start menu is stored in two locations.
    One is in the hidden StartMenu folder:
    C:\Users\(user-name)\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu
    And the other is in the registry:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage2
    If you want to deploy over 200 pcs ,here are two links may do you a favor.
    How to Backup and Restore Pinned Start Menu Items in Windows 7
    http://www.sevenforums.com/tutorials/212930-start-menu-backup-restore-pinned-items-windows-7-a.html
    NOTE: This response contains a reference to a third party World Wide Web site. Microsoft is providing
    this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites.
    Pin Items to the Start Menu or Windows 7 Taskbar via Script
    http://blogs.technet.com/b/deploymentguys/archive/2009/04/08/pin-items-to-the-start-menu-or-windows-7-taskbar-via-script.aspx

  • Expanding folders as submenus on the Start menu

    You can add shortcuts to the Start menu, in the top left pane.  If you add a folder there, when the user clicks on it, prior Windows versions would display its contents as a submenu.  Windows 7 instead opens the folder in Explorer. 
    Is there a way to make it display a submenu instead?

    You can do all this is the right pane (Win7, not sure others). R-click on start button, go to Properties, then in Start Menu tab go to Customize. Scroll down until you see Personal Folder and select Display as a menu radio button. Now all files/folders auto-expand
    to their contents as you hover over them (click if you want). I added a MyDevelopment folder (just to keep naming conventions a bit, also have a Installs folder there. Now you can put all your development their. If you allready have development folder, navigate
    to it. Clicking on an item launches it, or browses a sub-folder. R-clicking on folder allows you the option to open that folder.
    As far as the Start Menu their are a lot of articles and utilities to adding expanding folders and moving start menu items to these for better organization. One simple trick is to pick an expanding folder drag copy to another existing folder. Rename that
    copy to something and then move back to parent level. I've done this with two folders ("1" and "2") which can be use to create new folders of your own by r-drag/copy 2 to 1 (select copy!), re-name copied folder to what you want, move back to parent level.
    Now you r-drag/copy any folder in you system to these (drag and hover over All Programs, continue to drag to your folder, hover, move in till you see a line and let go r-button. The folder and all their sub-folders become expandable.
    Copy has to be done (will not copy contents just makes all short-cuts). Looking into making this process easier or write an app for assisting in this method but I sort like the popup menus in right pane.
    I have also created my own toolbar on taskbar using my user dir for the new folder. A lot easier to make automatically everything is a popup when hover over. Had to make a "MyPrograms" folder in my user dir and create logical catagories there for programs.
    Then same thing having to r-drag/copy folder/itmes in start menu to "MyPrograms" folder.
    Have documented all this and if want to you can email me
    [email protected]. Soon will have StartMenuOrganized doc done both detailing steps to accomplish all this. I don't know about you, I've looked at Win8 and why clutter up your screen with all these windows (in their new UI Metro/Aero?). Can allready do
    this in other windows and drag drop items to apps and launch! Rather have clean desktop w/organized access to programs and data.

  • How to get deleted programs in the start menu?

    Hi,
    I foolishly deleted (by accident) my all programs folder on the start menu.
    This has emptied the programs folder on the start menu through windows explorer as well.
    I still have access to all of my programs by searching for them or by going through program files. How can I rebuild my start menu back to the original WITHOUT reinstalling windows or anything like that.
    Unfortunatly, I can't do a restore because it is set to do a clean up of all old restore points, and it did this about 5 minutes before the problem occured.
    PLEASE HELP ME!!!
    Tom

    Hi,
    Is there any way of getting all of the links back without having to do them manually.
    There must be a way of restoring or forcing the computer to research for all of the installed programs on the "Vista C" drive. I have tried going through the RegEdit but that hasn't helped at all. The CMD code that I got off another forum doesn't work either.
    Thanks for your reply though
    Tom

  • Adobe Items on Start Menu

    I just installed Adobe Acrobat Standard 9.0.  It put 2 items on the start menu.  It didn't create a folder on the start menu named "Adobe" and then put the
    m in that folder.   It just litters the start menu with them.  Who does Adobe think they are?  When are they going to grow up and follow industry standards that have been around for years and put their stuff in a folder like it belongs?  I had to manually create a folder, and move the 2 items into the folder.  Then Adobe Updater ran, and duplicated the shortcuts back to the start menu.  Agh!!!
    Adobe Acrobot is like 30+ megs and does nothing but display PDF's.  Firefox is like 6 megs and can display the entire internet.  Why is it so bloated?

    bedub1 wrote:
    I just installed Adobe Acrobat Standard 9.0.  It put 2 items on the start menu.  It didn't create a folder on the start menu named "Adobe" and then put the
    m in that folder.   It just litters the start menu with them.
    If you downloaded Reader alone (and not Air...etc), it would have added one item like anything else.
    bedub1 wrote:
     Adobe Acrobot is like 30+ megs and does nothing but display PDF's. 
    Firefox is like 6 megs and can display the entire internet.  Why is it
    so bloated?
    Have you read the features?
    If all you want to do is view and print PDF's then download Foxit Reader.

  • Build 10061 - Start Menu not opening programs other than Modern UI applications

    When I attempt to open a program via the start menu absolutely nothing happens, unless I am attempting to open a Modern UI app.  I've tried deleting the shortcut and "re-pinning" it to the start menu and it still does not work.  Any
    ideas?

    Assuming you are using build 10061.
    Will it work if you right click at the program shortcut > select Run As Admin ?
    excerpt from Insider Hub:
    Here are some known issues for this build
    We know this one will be a bit painful but there is a bug with this build in which Win32 (desktop) apps won’t launch from the Start menu. The workaround is to use search to find and launch these apps and pin them to your taskbar for quick access.

  • DESKTOP USERS NEED ABILITY TO EDIT START MENU

    One cannot currently edit the Windows 10 Tech Preview Start Menu, in the Windows 7 and earlier manner.  Desktop users need this ability back, pronto.
    For example, one cannot right-click an empty folder in the Start Menu and choose to delete it.  To delete an empty folder from the start menu, one must navigate to C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs,
    then delete the offending folder or file, then LOGOUT and log back in for the changes to take effect.
    We ALSO need the ability to organize the "metro-style" apps into a folder, sort them, drag-and-drop them, etc., etc., just like any other program.  Currently, on this PC I have over 70 "metro-style" apps installed.  In the "All
    Apps" view of the Start Menu, I now have to scroll past 70 items just to get to the "regular" programs installed on the PC.  Not good.  Not good at all.
    I hope the development team has this on their plate or, if not, is listening.  This one is very important to desktop users!!

    I agree whole heartedly with Furry Panther poster but think the problem is more basic than that.  To address the concerns of LuisHMex, this variation on the start menu issue is very much an IT consern.  I've already documented this issue here Remote
    Install Customize Start Menu but was asked to go to TechNet because the other site was too consumer oriented. 
    This one issue more than any other has stopped us from deploying Windows 8 on our 14,000 computers and it seems to be continuing on to 10.  I have a software library of 200 titles that have to be installed remotely after imaging.  There seems
    to be no way to publish these applications to the start menu via script and it is not feasible to have group policies for every subset of software.  Not only do they need to show up, but show up before the Metro style apps.  We'd get non stop calls
    to the help desk if users had to scroll right to find an app they are looking for.  I'd love to have a start screen category called "desktop apps" where I could publish all the titles installed post imaging.
    Going beyond that, has anyone ever installed Smart Notebook?  It installs 15 icons of different utilities.  I was hoping that the start screen would support folders like an Android or iPhone does.  While the start screen is friendly with one
    button access, it is difficult to find the tile you want due to the sheer number of tiles available.  With this new hybrid start menu, perhaps all the desktop apps could go back to the Win7 style menu with folders and leave the Metro one for the start
    screen style part.  It just needs a way to manage that separation. 

Maybe you are looking for

  • Free Goods recalculation.

    I experts, I have a problem, I need to use 'BAPI_SALESORDER_CHANGE' in a away that when I call the function the system recalculate the free good of the items. The standard system have validation that when the quantity does not change the free goods a

  • Edit Photo dialog box will not display

    When I select edit in CS5 my file goes straight to CS5 and my edit in the dialog box will not display. I have no way to oprn with a copy or etc with out the  edit dialalog box. Iam using LR 4 latest version I must have changed some thing no realizing

  • I forgot my password to use my Ipod touch...

    I forgot my password to use my Ipod touch...  What can I do ?

  • Trying to make a new password without a disc

    So I bought a used macbook and the guy who sold me it, didn't send any discs and I can't get any updates on it. I've tried using the this code to get a new one... 1. Hold Down Apple+S while booting computer 2. Type: sh /etc/rc 3. Type: passwd root (i

  • How to get refreshed report

    Dear Friends, I have attached my report in my .aspx file. I am passing the condition through myCrystalReportViewer.SelectionFormula It was showing all record's reports those are tested in CR2008. But as soon as we have entered a new record through ou