Dougiefresh Posted June 12, 2006 Share Posted June 12, 2006 (edited) 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 June 12, 2006 by Dougiefresh Link to comment Share on other sites More sharing options...
Maelstorm Posted June 12, 2006 Share Posted June 12, 2006 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 More sharing options...
Dougiefresh Posted June 12, 2006 Author Share Posted June 12, 2006 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 More sharing options...
Paulie Posted June 12, 2006 Share Posted June 12, 2006 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 More sharing options...
Dougiefresh Posted January 12, 2007 Author Share Posted January 12, 2007 (edited) 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 January 12, 2007 by Dougiefresh Link to comment Share on other sites More sharing options...
MHz Posted January 12, 2007 Share Posted January 12, 2007 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") Link to comment Share on other sites More sharing options...
Dougiefresh Posted January 13, 2007 Author Share Posted January 13, 2007 (edited) 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 January 13, 2007 by Dougiefresh Link to comment Share on other sites More sharing options...
tobyb Posted September 8, 2009 Share Posted September 8, 2009 (edited) 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 September 8, 2009 by tobyb Link to comment Share on other sites More sharing options...
epicfail Posted September 12, 2009 Share Posted September 12, 2009 this dosnt work 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 Link to comment Share on other sites More sharing options...
jvanegmond Posted September 12, 2009 Share Posted September 12, 2009 (edited) $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 September 12, 2009 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
epicfail Posted September 12, 2009 Share Posted September 12, 2009 that still dont work it just runs the script then stops it nothing pinned Link to comment Share on other sites More sharing options...
epicfail Posted September 12, 2009 Share Posted September 12, 2009 $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? Link to comment Share on other sites More sharing options...
jvanegmond Posted September 12, 2009 Share Posted September 12, 2009 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 MaxTrax 1 github.com/jvanegmond Link to comment Share on other sites More sharing options...
epicfail Posted September 12, 2009 Share Posted September 12, 2009 oh sweet thanks what i was doing wrong was adding program.lnk not .exe Link to comment Share on other sites More sharing options...
spymare Posted December 8, 2010 Share Posted December 8, 2010 how would you unpin a item from the taskbar instead of pinning it? Link to comment Share on other sites More sharing options...
guinness Posted December 8, 2010 Share Posted December 8, 2010 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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now