Jump to content

[Inno Setup]: How to Pin Program to TaskBar in Win 7... ;-)


alfreire
 Share

Recommended Posts

After much search in internet I found a way to Pin Program to TaskBar in Win 7 with Inno Setup or other installers... There is a program called TaskBar Pinner here http://winaero.com/comment.php?comment.news.108 can be used with this command as example:

 

taskbarpinner.exe "c:\windows\explorer.exe"




 

I've simplified the files, this is the link
https://mega.co.nz/#!p1RXGIIZ!O_jo4xPZu_wTp2bNsVuvbXb3jEUJwUO2PTC7CMOKqOk

Use in Inno Setup:

[Files]Source: "{tmp}\TaskPin\*.dll"; DestDir: "{tmp}\TaskPin"; Check: "IsWin7"Source: "{tmp}\TaskPin\TaskPin_x86.exe"; DestDir: "{tmp}\TaskPin"; Check: "IsWin786"Source: "{tmp}\TaskPin\TaskPin_x64.exe"; DestDir: "{tmp}\TaskPin"; Check: "IsWin764"[Run]Filename: "{tmp}\TaskPin\TaskPin_x86.exe"; Parameters: """{pf}\Program.exe"""; Description: "Pin Program to TaskBar"; Check: "IsWin786"; Flags: postinstall Filename: "{tmp}\TaskPin\TaskPin_x64.exe"; Parameters: """{pf}\Program.exe"""; Description: "Pin Program to TaskBar"; Check: "IsWin764"; Flags: postinstall [code]function IsWin7: Boolean;var  ver: TWindowsVersion;begin  GetWindowsVersionEx(ver);  Result := UsingWinNT and (ver.Major = 6) and (ver.Minor <= 1);end;function IsWin786: Boolean;var  ver: TWindowsVersion;begin  GetWindowsVersionEx(ver);  Result := UsingWinNT and (ver.Major = 6) and (ver.Minor <= 1) and Not IsWin64;end;function IsWin764: Boolean;var  ver: TWindowsVersion;begin  GetWindowsVersionEx(ver);  Result := UsingWinNT and (ver.Major = 6) and (ver.Minor <= 1) and IsWin64;end;

 

I hope you find it helpful...
Regards... ;-)

 

p.d.: If a moderator thinks this is the wrong section, you can move it to where you think... ;-)

Edited by alfreire
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...