Jump to content

How do I pin a program to Start Menu


Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 7 months later...

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 2 years later...

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
Link to comment
Share on other sites

$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
Link to comment
Share on other sites

  • 1 year later...
Check this out:

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_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()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...