Jump to content

Add Program to TarkBar and StartMenu


Danyfirex
 Share

Recommended Posts

HI. I was needing to add a program to Tarkbar(an easy way without using objectcreateinterface :wub:)   so I found this. So then I deduced how to add to the StartMenu while I see the shell32 in hex editor search for taskbarunpin|taskbarpin string. I found another two interesting string (startpin|startunpin) So I try out and they work too but to add to StartMenu.

This is not an official way to do this, however it works.

$sFileLnk parameter must be Link(.lnk) to our program.

;~ Success: True.
;~ Failure: False.

Func DeleteFromTaskBar($sFileLnk)
Return _WinAPI_ShellExecute($sFileLnk,"","", "taskbarunpin")
EndFunc


Func AddToTaskBar($sFileLnk)
Return _WinAPI_ShellExecute($sFileLnk,"","", "taskbarpin")
EndFunc


Func AddToStartMenu($sFileLnk)
Return _WinAPI_ShellExecute($sFileLnk,"","", "startpin")
EndFunc


Func DeleteFromStartMenu($sFileLnk)
Return _WinAPI_ShellExecute($sFileLnk,"","", "startunpin")
EndFunc

 

Saludos

Link to comment
Share on other sites

You can use ShellExecute for avoid to use WinAPIShellEx.au3 as done here.

I know. But if you pass a file path to ShellExecute instead of a .lnk will show an MessageBox.

 

Saludos

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

×
×
  • Create New...