Topic: Add_Pin  (Read 5226 times)

0 Members and 1 Guest are viewing this topic.

« on: October 15, 2010, 01:48:09 AM »


  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 7781
Syntax only for NT6x (ex: Win10PESE, Win8PESE Win8.1SE, Win7PESE) project plugins.

Pin Adding is a feature of "Windows Explorer Shell" ,
 It has a complex nature to understand,
  read all current page or check google for special pin feature,
   If you can not figure out, do not worry, you can live without pins on PE,
      Shortcuts are more popular and more solid than pins.  :wink:

Full Syntax:
Add_Pin,Type,Order(0,1,2,..,8,9),(path\)FileName,Title,Work Folder,Parameters,(path\)IconFile#$cIconIndex,StartMode=(1,2,3)#$cHotKey,ToolTipText

Pin Parameters
RecentPrograms (look end of document)

Tip: If no Type written, It is set to StartMenu

A number between 0 and 9
If NO value given, than first available place Automatically found --> Adviced
Also Auto value can be used to find first available pace  Automatically (-->helps to write plugin writing easier in some cases)

Order Warning:
If a plugin overwrite previously Type with same Order, than you will get a warning in log.

you can use target path of a file,
example: #$pSystemRoot#$p\calc.exe
You can use .lnk files in user profile
$Desktop\My Computer.lnk

Shortcut (some) Parameters
Value to set how the window of the launched program should be.
1 = Show (Default)
2 = Show_Minimized (program will start minimized)
3 = Show_Maximized (program will start maximized)

hotkeys written splitted with + without using space
for full list check hotkey list attached.

Add_Pin,StartMenu,,"$Desktop\My Computer.lnk"
Add_Pin,StartMenu,,%PE_Programs%\%ProgramFolder%\MyTool_To_Pin.exe,"My Pinned Tool"

'Taskbar and StartMenu' Pin Features:
1) Not all files can be pinned
a) links (Shorcuts) (.lnk) pointing to .cpl files can not be pinned
b) Files located on removable devices (CD UFD  (USB Stick) etc.) can not be pinned.
 (Workaround --> Pin StartMenu Shortcut of a file on CD / USB )
2) The name of pin is automatically set based on the Shorcut ( .lnk ) name or program name.
 (Tip -->Pin .lnk (Shorcut) is flexible and used more widely than direct file)
3) maximum 10 per type items can be pinned. (10+10=20)


** RecentPrograms do not have 'Taskbar and StartMenu' Pin Features (restrictions)  :thumbsup:**
so to pin items at cd etc. one can easly use Add_Pin,RecentPrograms
For now Recent programs only have 1 parameter support, typical examples:


And for now it supports $Start_Menu and $Desktop

Reason behind: Pin adding technique (by 2aCD) used for RecentPrograms is totally different from
pin adding of StartMenu and Taskbar

Note: There are no RecentPrograms shortcuts created if the Apps is already Pinned to StartMenu or even Taskbar only.

1 – Pins Plugin
SE projects have Finals\1 – Pins available to easer creating pins.
Inside box you must write ”Full Path to Program inside WinPE”
This is wrong, it is not Full Path:

This is wrong, it is 1-not Full Path 2-not even correct
Add_Pin,Taskbar,, \Programs\GoogleChrome\Application\chrome.exe

This is mostly wrong:
,  on SE projects as default \Programs\ folder is not at %systemdrive%

 See Examples box inside “1 – Pins” Plugin
 Advice: Use Full Path for shortcuts (.lnk files): ex:  $Start_Menu\Programs\Network\Mozilla Firefox.lnk
Also READ :
 'Taskbar and StartMenu' Pin Features:
 Add Pin,RecentPrograms:

Windows Pin features
NT5x=Pin Exists with 1) StartMenu 2) StartMenuRecentPrograms
 -> Gena project have a  \Components\Tweaks Explorer\”Start Menu Pin” plugin
Nt6x(w7)=Pin Exists with 1) StartMenu* 2) StartMenuRecentPrograms 3) TaskBar*
 -> Win10PESE, Win8PESE Win8.1SE, Win7PESE have  \Finals\”1 Pins” plugin
      AND Add_Plugin command created for individiual plugins.
         Tip: You can disable \Finals\”1 Pins” plugin during build, still pins are added by standalone plugins.  :thumbsup:

Mostly pinning shortcuts (.lnk) preferred since one can change properties of shortcut.

(* os difference on method and/or behaviour)

On NT6x (Win7, Win8, Win8.1, Win10....)
Internally, When Windows Pins, Windows creates a shortcut to control properties of pins in following locations (I guess)
..\Config\Systemprofile\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
..\Config\Systemprofile\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu
..\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
..\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu

For Add_Pin command; Add_Pin,Type,Order(0,1,2,..,8,9),(path\)FileName
is naturally enough to create a pin, which is enough for Winapi.
Rest of Add_Pin command parameters provides full shortcut properties,
so instead of creating a .lnk first than adding pin to this .lnk, with single api both tasks can be done.
It is up to loader/tool of the project to support shortcut (#4 ... #9) parameters or not. Add_Pin command would suit both type of design.

Additional About Recent Programs:
Add Recent Programs Magic key by 2aCD (to get recent program list not deleted at bootup.)

Add Pin Syntax Home Page:
Au3 Pin Topic:
Au3 Shortcut:
Au3 Send:
Pinable Or Not:
Some words about Limitation:

Thanks to Rui Paz giving idea of Add_Api command and its design in Macro Library
Thanks to Max_Real QNX & JFX providing informations of creating pin.
Thanks to Galapo and BlueLife for improving codes and testing.
Thanks to 2aCD for Add_Pin,RecentPrograms.
« Last Edit: January 26, 2018, 04:02:48 AM by Lancelot »


Powered by EzPortal