Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 



Maelstorm

Pin To Start Menu - Solved

Recommended Posts

A small AutoIt-Script to enable/disable the "Quick Lauch" in Taskbar

(change on every execution, "disabled is XP-Standard, so one run turn to ON):

Run("RunDll32.exe shell32.dll,Options_RunDLL 1")
Sleep(1000)
Send("{S}")
Send("{ENTER}")

My way to setup my "Quick Lauch" (delete everything, setup new links, SFX, can be changed easily):

701___Quick_Launch.exe

Edited by g-force

Share this post


Link to post
Share on other sites

Run("RunDll32.exe shell32.dll,Options_RunDLL 1")
Sleep(1000)
Send("{S}")
Send("{ENTER}")

Could not get it to work in XP.

However if I change Send("{S}") to Send("!{Q}"), it works in XP. Is your script meant for Vista?

Share this post


Link to post
Share on other sites
Could not get it to work in XP.

However if I change Send("{S}") to Send("!{Q}"), it works in XP. Is your script meant for Vista?

No, it`s for WinXP - and it works on my XP-SP3.

I tried your changes, but it won`t work on my XP.

Share this post


Link to post
Share on other sites

Hi g-force

I tried another 2 XP PC with your script & my script. Both yr couldn't work whereas for my scrpit : 1 m/c works but after applied, the Start menu is unable to go away immediately. Takes about 6 sec to go away by itself. The 2nd m/c works w/o issue.

I don't know what causes this, so I guess "your mileage may varies". Maybe other user can feebdack their finding.

Just for sharing info only. Cheers :)

*It is not my intention to say who comes up with better script

Edit: When I translate Quick to German, it means Schnellsuche. Does it means the key is "S" as in your script?

Edited by Geej

Share this post


Link to post
Share on other sites

i`ve solved and rewrite in autoit3.

i store my links in C:\WINDOWS\Linkq


$Shell = ObjCreate("shell.application") ; Get the Windows Shell Object
$strPinVerb = "P&in to Start Menu"

$objFolder = $Shell.Namespace("C:\WINDOWS\Linkq")
$objFolderItem = $objFolder.ParseName("Yahoo! Messenger.lnk")
$objFolderItem.InvokeVerb($strPinVerb)

$objFolderItem = $objFolder.ParseName("GOM Player.lnk")
$objFolderItem.InvokeVerb($strPinVerb)

$objFolderItem = $objFolder.ParseName("WinAmp.lnk")
$objFolderItem.InvokeVerb($strPinVerb)

$objFolderItem = $objFolder.ParseName("Media Player Classic.lnk")
$objFolderItem.InvokeVerb($strPinVerb)

$objFolderItem = $objFolder.ParseName("mIRC.lnk")
$objFolderItem.InvokeVerb($strPinVerb)

$objFolderItem = $objFolder.ParseName("Mozilla Firefox.lnk")
$objFolderItem.InvokeVerb($strPinVerb)

$objFolderItem = $objFolder.ParseName("Notepad.lnk")
$objFolderItem.InvokeVerb($strPinVerb)

Share this post


Link to post
Share on other sites

i`ve solved and rewrite in autoit3.

i store my links in C:\WINDOWS\Linkq


$Shell = ObjCreate("shell.application") ; Get the Windows Shell Object
$strPinVerb = "P&in to Start Menu"

$objFolder = $Shell.Namespace("C:\WINDOWS\Linkq")
$objFolderItem = $objFolder.ParseName("Yahoo! Messenger.lnk")
$objFolderItem.InvokeVerb($strPinVerb)

$objFolderItem = $objFolder.ParseName("GOM Player.lnk")
$objFolderItem.InvokeVerb($strPinVerb)

$objFolderItem = $objFolder.ParseName("WinAmp.lnk")
$objFolderItem.InvokeVerb($strPinVerb)

$objFolderItem = $objFolder.ParseName("Media Player Classic.lnk")
$objFolderItem.InvokeVerb($strPinVerb)

$objFolderItem = $objFolder.ParseName("mIRC.lnk")
$objFolderItem.InvokeVerb($strPinVerb)

$objFolderItem = $objFolder.ParseName("Mozilla Firefox.lnk")
$objFolderItem.InvokeVerb($strPinVerb)

$objFolderItem = $objFolder.ParseName("Notepad.lnk")
$objFolderItem.InvokeVerb($strPinVerb)

I have a VBS I created with some help from a post I found:

I setup the default user profile to run this vbs once (stored locally on the image) so every profile gets these pinned icons set on first login.

'********************************************************************************************

'* *

'* PIN TO TASKBAR SCRIPT *

'* Dan M - 07/29/2010 *

'* *

'********************************************************************************************

on error resume next

'Required Objects

Set objShell = CreateObject("Shell.Application")

Set objFSO = CreateObject("Scripting.FileSystemObject")

'Remove Pins

strlPath = "C:\Program Files (x86)\Windows Media Player\wmplayer.exe"

strFolder = objFSO.GetParentFolderName(strlPath)

strFile = objFSO.GetFileName(strlPath)

Set objFolder = objShell.Namespace(strFolder)

set objFolderItem = objFolder.ParseName(strFile)

Set colVerbs = objFolderItem.Verbs

For each itemverb in objFolderItem.verbs

If Replace(itemverb.name, "&", "") = "Unpin from Taskbar" Then itemverb.DoIt

Next

'Remove Pins

strlPath = "C:\Windows\explorer.exe"

strFolder = objFSO.GetParentFolderName(strlPath)

strFile = objFSO.GetFileName(strlPath)

Set objFolder = objShell.Namespace(strFolder)

set objFolderItem = objFolder.ParseName(strFile)

Set colVerbs = objFolderItem.Verbs

For each itemverb in objFolderItem.verbs

If Replace(itemverb.name, "&", "") = "Unpin from Taskbar" Then itemverb.DoIt

Next

'Pin Office Objects

strlPath = "C:\Program Files (x86)\Microsoft Office\Office12\WINWORD.EXE"

strFolder = objFSO.GetParentFolderName(strlPath)

strFile = objFSO.GetFileName(strlPath)

Set objFolder = objShell.Namespace(strFolder)

set objFolderItem = objFolder.ParseName(strFile)

Set colVerbs = objFolderItem.Verbs

For each itemverb in objFolderItem.verbs

If Replace(itemverb.name, "&", "") = "Pin to Taskbar" Then itemverb.DoIt

Next

strlPath = "C:\Program Files (x86)\Microsoft Office\Office12\EXCEL.EXE"

strFolder = objFSO.GetParentFolderName(strlPath)

strFile = objFSO.GetFileName(strlPath)

Set objFolder = objShell.Namespace(strFolder)

set objFolderItem = objFolder.ParseName(strFile)

Set colVerbs = objFolderItem.Verbs

For each itemverb in objFolderItem.verbs

If Replace(itemverb.name, "&", "") = "Pin to Taskbar" Then itemverb.DoIt

Next

strlPath = "C:\Program Files (x86)\Microsoft Office\Office12\OUTLOOK.EXE"

strFolder = objFSO.GetParentFolderName(strlPath)

strFile = objFSO.GetFileName(strlPath)

Set objFolder = objShell.Namespace(strFolder)

set objFolderItem = objFolder.ParseName(strFile)

Set colVerbs = objFolderItem.Verbs

For each itemverb in objFolderItem.verbs

If Replace(itemverb.name, "&", "") = "Pin to Taskbar" Then itemverb.DoIt

Next

Share this post


Link to post
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


  • Recently Browsing   0 members

    No registered users viewing this page.

×