Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

How do I pin a program to Start Menu


  • Please log in to reply
15 replies to this topic

#1 Dougiefresh

Dougiefresh

    Wayfarer

  • Active Members
  • Pip
  • 83 posts

Posted 12 June 2006 - 12:46 AM

I have written a script to install BitComet on a computer and add a CLSID for the My Computer and Control Panel to ease access to the folder containing the downloads. I want to pin the script to the Start Menu using AutoIt. The script's path is C:\WINDOWS\SCRIPT\BITCOMET.EXE (path in bold). Any ideas on how to do this? Any help would be appreciated! Thanks!

Edited by Dougiefresh, 12 June 2006 - 12:49 AM.








#2 Maelstorm

Maelstorm

    Seeker

  • Active Members
  • 14 posts

Posted 12 June 2006 - 12:55 AM

I have a write up here. Granted, this is for a Windows XP unattended install though, the actual format is in binary, and I haven't really cracked the code yet. One other thing...Microsoft does NOT want software vendors to stuff pinned items onto the start menu. They want the user to do it themselves, which probably explains why they did it this way.

So for the moment, that's the best way of doing it.
The Maelstorm

#3 Dougiefresh

Dougiefresh

    Wayfarer

  • Active Members
  • Pip
  • 83 posts

Posted 12 June 2006 - 01:04 AM

I have a write up here. Granted, this is for a Windows XP unattended install though, the actual format is in binary, and I haven't really cracked the code yet. One other thing...Microsoft does NOT want software vendors to stuff pinned items onto the start menu. They want the user to do it themselves, which probably explains why they did it this way.

So for the moment, that's the best way of doing it.

(damn) Oh, well. I guess that is why I can't find sh** on how to do it..... Thanks for the information. I really appreciate it!

#4 Paulie

Paulie

    Waiting for Misaki Nakahara

  • Active Members
  • PipPipPipPipPipPip
  • 5,145 posts

Posted 12 June 2006 - 04:29 AM

I have a write up here. Granted, this is for a Windows XP unattended install though, the actual format is in binary, and I haven't really cracked the code yet. One other thing...Microsoft does NOT want software vendors to stuff pinned items onto the start menu. They want the user to do it themselves, which probably explains why they did it this way.

So for the moment, that's the best way of doing it.


Wait, couldn't you just move it to the start menu folder(one with pinned items)? With "FileMove"? Off hand i don't know what folder that is, but it has shorcuts, therefor there has to be a directory holding them.

Just find were on the comp files pinned to start menu are found.
I'm still looking for my heart song.

Posted Image


#5 Dougiefresh

Dougiefresh

    Wayfarer

  • Active Members
  • Pip
  • 83 posts

Posted 12 January 2007 - 09:57 AM

I found a link at http://www.msfn.org/board/index.php?showtopic=89058 regarding programmably pinning a program to the start menu. However, it's in VB using Objects and such. Anyone care to translate to AutoIt? I can't do it myself.....

EDIT: Here's the VB script (cut and pasted):
CODESet objShell = CreateObject("Shell.Application") Set objFolder = objShell.Namespace("C:\Windows\System32") Set objFolderItem = objFolder.ParseName("calc.exe") objFolderItem.InvokeVerb("P&in to Start Menu")

Edited by Dougiefresh, 12 January 2007 - 09:59 AM.


#6 MHz

MHz

    Just simple

  • MVPs
  • 5,737 posts

Posted 12 January 2007 - 10:07 AM

Anyone care to translate to AutoIt?

Done
$objShell = ObjCreate("Shell.Application") $objFolder = $objShell.Namespace("C:\Windows\System32") $objFolderItem = $objFolder.ParseName("calc.exe") $objFolderItem.InvokeVerb("P&in to Start Menu")


:)

#7 Dougiefresh

Dougiefresh

    Wayfarer

  • Active Members
  • Pip
  • 83 posts

Posted 13 January 2007 - 11:54 AM

Thanks MHz!! Your help is appreciated! Now I can pin stuff to the start menu programmatically!

Wait, couldn't you just move it to the start menu folder(one with pinned items)? With "FileMove"? Off hand i don't know what folder that is, but it has shorcuts, therefor there has to be a directory holding them.

Just find were on the comp files pinned to start menu are found.

Sorry it took me half a year to respond. The Start Menu doesn't have a folder with pinned items. If it did, I wouldn't be having this problem because I could do as you suggested. Unfortunately, the pinned items are stored in the registry. However, the AutoIt code solves the problem that I was having. So thanks everybody for your assistance!

Edited by Dougiefresh, 13 January 2007 - 12:04 PM.


#8 tobyb

tobyb

    Seeker

  • Active Members
  • 5 posts

Posted 08 September 2009 - 06:02 PM

i know this an old post but i thought i'd put this out there just in case there is someone else looking for a way to pin items to the start menu in vista.

the version previously posted in this thread works but needs a little modification to work with vista.
hope this helpful

this first one is based off the scripting guys.
Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.Namespace("C:\path to your program or link\") Set objFolderItem = objFolder.ParseName("your program.lnk") For each Verb in objFolderItem.Verbs()      If Verb.name = "P&in to Start Menu" Then Verb.DoIt Next



this second one is the above in autoit
$objShell = ObjCreate("Shell.Application") $objFolder = $objShell.Namespace("C:\path to your program or link\") $objFolderItem = $objFolder.ParseName("your program.lnk") For $val in $objFolderItem.Verbs()      If $val() = "P&in to Start Menu" Then $val.DoIt() Next

Edited by tobyb, 08 September 2009 - 06:06 PM.


#9 epicfail

epicfail

    Prodigy

  • Active Members
  • PipPipPip
  • 182 posts

Posted 12 September 2009 - 02:41 PM

this dosnt work :D well dont work in windows7 that should be like vista

$objShell = ObjCreate("Shell.Application") $objFolder = $objShell.Namespace("C:\path to your program or link\") $objFolderItem = $objFolder.ParseName("your program.lnk") For $val in $objFolderItem.Verbs()      If $val() = "P&in to Start Menu" Then $val.DoIt() Next  


#10 Manadar

Manadar

         

  • MVPs
  • 10,893 posts

Posted 12 September 2009 - 02:45 PM

$objShell = ObjCreate("Shell.Application") $objFolder = $objShell.Namespace("C:\path to your program or link\") $objFolderItem = $objFolder.ParseName("your program.lnk") For $val in $objFolderItem.Verbs()      If StringInStr($val(), "Start Menu") Then $val.DoIt()      If StringInStr($val(), "Task Bar") Then $val.DoIt() Next



epicfail, try this for me, please.

Edited by Manadar, 12 September 2009 - 02:46 PM.


#11 epicfail

epicfail

    Prodigy

  • Active Members
  • PipPipPip
  • 182 posts

Posted 12 September 2009 - 03:38 PM

that still dont work it just runs the script then stops it nothing pinned

#12 epicfail

epicfail

    Prodigy

  • Active Members
  • PipPipPip
  • 182 posts

Posted 12 September 2009 - 03:41 PM

$objFolder = $objShell.Namespace("C:\path to your program or link\")

am i ment to add the full path to the link or just to the folder its in?

#13 Manadar

Manadar

         

  • MVPs
  • 10,893 posts

Posted 12 September 2009 - 04:30 PM

This works in Windows 7:

$objShell = ObjCreate("Shell.Application") $objFolder = $objShell.Namespace("C:\Windows\System32") $objFolderItem = $objFolder.ParseName("calc.exe") For $val in $objFolderItem.Verbs()     If StringInStr($val(), "Pin to") Then $val.DoIt() Next


#14 epicfail

epicfail

    Prodigy

  • Active Members
  • PipPipPip
  • 182 posts

Posted 12 September 2009 - 04:43 PM

oh sweet thanks what i was doing wrong was adding program.lnk not .exe

#15 spymare

spymare

    Adventurer

  • Active Members
  • PipPip
  • 100 posts

Posted 08 December 2010 - 09:48 AM

how would you unpin a item from the taskbar instead of pinning it?

#16 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 17,640 posts

Posted 08 December 2010 - 11:27 AM

Check this out: http://www.autoitscript.com/forum/topic/120235-adding-items-to-windows-7-taskbar/page__view__findpost__p__835365

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 26/09/2014





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users