Hi,
I found this script for pinning items to the Win 7 start menu for all users.
Const CSIDL_COMMON_PROGRAMS = &H17
Const CSIDL_PROGRAMS = &H2
Set objShell = CreateObject("Shell.Application")
Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Accessories")
Set objFolderItem = objFolder.ParseName("Calculator.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb in colVerbs
If Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt
Next
What I am wondering is how do I tweak this if the item I wish to pin is not in a folder off the 'Programs' menu?
Do I simply change this?
Set objFolder = objShell.Namespace(strAllUsersProgramsPath)
I think I messed around with that and it was giving me an error. Also, what about adding additional pins?
Thanks
I found this script for pinning items to the Win 7 start menu for all users.
Const CSIDL_COMMON_PROGRAMS = &H17
Const CSIDL_PROGRAMS = &H2
Set objShell = CreateObject("Shell.Application")
Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path
Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Accessories")
Set objFolderItem = objFolder.ParseName("Calculator.lnk")
Set colVerbs = objFolderItem.Verbs
For Each objVerb in colVerbs
If Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt
Next
What I am wondering is how do I tweak this if the item I wish to pin is not in a folder off the 'Programs' menu?
Do I simply change this?
Set objFolder = objShell.Namespace(strAllUsersProgramsPath)
I think I messed around with that and it was giving me an error. Also, what about adding additional pins?
Thanks