Solved

Script to Pin Folder to Classic Shell Start Menu

Posted on 2016-07-23
3
82 Views
Last Modified: 2016-09-21
Hi All,

We are using Classic Shell.
Desired result: A Folder on Classic Shell Start Menu that will  display it like a "Menu"
It should be done via script.

When I right click the folder and select "Pin to Start menu (Classic Shell)"  It creates the desired result.

When I create Shortcut and paste it in %appdata%\ClassicShell\Pinned\  It does not produce the desired result. No Menu of folder content.
Same result when I drag/drop>"Created shortcut Here"


Source Folder is %appdata%\Microsoft\Windows\Start Menu\Programs\GGHC
Destination folder for Pin to Start menu (Classic Shell) is %appdata%\Classic Shell\Pinned

OS:
Windows 10
Windows 2012R2

I have tried a 'Pin To Start Menu' that I used on Windows 7 but that appears to only work for files, not Pinning Folders.
7-23-2016-1-36-37-PM.jpg
0
Comment
Question by:GGHC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 30

Expert Comment

by:serialband
ID: 41726077
Maybe these might work...

https://blogs.technet.microsoft.com/heyscriptingguy/2004/11/11/can-i-pin-a-file-to-the-start-menu-by-using-a-script/
Set objShell = CreateObject(“Shell.Application”)

Set objFolder = objShell.Namespace(“C:\Windows\System32”)

Set objFolderItem = objFolder.ParseName(“calc.exe”)


objFolderItem.InvokeVerb(“P&in to Start Menu”)

Open in new window


http://ss64.com/vb/syntax-pin.html

PIN.vbs
Dim strFolder, strExecutable
Set objShell = CreateObject("Shell.Application")

strFolder = "C:\Windows\System32\"
strExecutable = "notepad.exe"

Set objFolder = objShell.Namespace(strFolder)
Set objFolderItem = objFolder.ParseName(strExecutable)

Set colVerbs = objFolderItem.Verbs

'uncomment this section to display the available verbs
' For Each objVerb In colVerbs
' 	If objVerb <> "" Then
' 		WScript.Echo objVerb
' 	End If
' Next

'Loop through the verbs and if PIN is found then 'DoIt' (execute)
blnOptionFound = False
For Each objVerb In colVerbs
	If Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then
		objVerb.DoIt
		blnOptionFound = True
		WScript.Echo "The application '" & strExecutable & "' was just Pinned to the Start Menu."
	End If
Next

if blnOptionFound = false then
	WScript.Echo "The application '" & strExecutable & "' was already pinned to the Start Menu."
end if

Open in new window

0
 

Accepted Solution

by:
GGHC earned 0 total points
ID: 41737244
I ended up doing a work around. I precreated the Shortcuts and did a Run Once copy since ClassicShell is Shortcut friendly
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

No single Antivirus application (despite claims by manufacturers) will catch or protect you from all Virus / Malware or Spyware threats. That doesn't stop you from further protecting yourself however - and this article is to show you how.
Configuring Remote Assistance for use with SCCM
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question