Pin to taskbar on win 7

Got a problem you cannot solve? Try here.
justminime
Posts: 21
Joined: Sun Dec 20, 2009 7:56 am

Pin to taskbar on win 7

Postby justminime » Mon Aug 02, 2010 5:14 am

Hi all
WhenI pin to taskbar on windows 7 everything works great...
After upgrading which uninstall and installs i get a blank icon in taskbar which works fine and open my program.
This icon changes correctly after some refrashes like logging of and on or running program als right click on icon shows the righr icon.
how can i make it happen without refrashing the desktop?

Thank Erez
attached is the empty taskbar icon
Attachments
icon13.7.png
empty taskbar icon
icon13.7.png (16.74 KiB) Viewed 6091 times

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Pin to taskbar on win 7

Postby mills » Wed Aug 04, 2010 6:44 pm

Good catch! We're investigating this...
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Pin to taskbar on win 7

Postby mills » Tue Aug 10, 2010 2:56 pm

It may be possible to write an application to remove the pin. The best place to place it would be after the (Un)Install MSI Setup plugin call (Install/Remove MSI Package).

if Variable NEEDSUPGRADE Equals TRUE
..Set Variable REMOVEOLD to
..Set Variable ERROROLD to
..Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)

..if Variable WIZARD Not Equals CANCEL
....Run Program (pin remover)


This was the best resource I could find for pin removal (programmatically):
http://www.ananthonline.net/blog/dotnet ... -7-taskbar

There is some risk of doing it this way if the user cancels, that's why I added the check for CANCEL just in case the user canceled, which may be enough...
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.

InLoox
Posts: 12
Joined: Wed Mar 23, 2011 2:40 am

Re: Pin to taskbar on win 7

Postby InLoox » Wed Jan 21, 2015 5:38 am

Hello,

Is there a proper solution to this issue meanwhile? We do expirience the same phenomenon. Is there some way to refresh the task bar after the installation process has finished?

We use InstallAware Studio 15.

Thanks!

Markus

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Pin to taskbar on win 7

Postby FrancescoT » Thu Jan 22, 2015 12:24 pm

Dear Markus,

the alternative solution is to use the following script code snippet.

Code: Select all

if Variable NEEDSUPGRADE Equals TRUE
     
    <<<  NEW CODE START >>>
    Set Variable IS_WIN7 to FALSE
    Get System Setting Windows 7 into IS_WIN7
     
    if Variable IS_WIN7 Equals TRUE
      Set Variable STARTMENU to $TITLE$
      Get Common Folder Location Start Menu->Programs Group into SHORTCUTFILESALL
      Get Folder Location Start Menu->Programs Group into SHORTCUTFILES
      if Variable ALLUSERS Equals TRUE
        Set Variable SHORTCUTFOLDER to $SHORTCUTFILESALL$\$STARTMENU$
        else
        Set Variable SHORTCUTFOLDER to $SHORTCUTFILES$\$STARTMENU$
      end
      Set Variable SHELL_VERB to taskbarunpin
      Set Variable SHORTCUT to $SHORTCUTFOLDER$\<shortcutname>
      Call DLL Function Shell32.dll->ShellExecuteW
    end
    <<<  NEW CODE END>>>
   
    Set Variable REMOVEOLD to
    Set Variable ERROROLD to
    Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)

   .....

Note!
The new code have to placed before the (Un)Install MSI Setup plugin call (Install/Remove MSI Package) ... see <<< NEW CODE START >>> <<< NEW CODE END>>> markers.

Replace the <shortcutname> parameter of the "Set Variable SHORTCUT to .." with the effective shortcut name (the same you used with shortcut creation).


The effective code to add to your main script as IA Clipboard Format;
UNICODE VERSION

Code: Select all

~InstallAware Clipboard Data~
~End~
~{E9EC0770-0AF6-4772-B866-FC7326700A06}~
~Call DLL Function~
~{A82872A1-C1DB-4A5B-94DA-9D84FC1C33EE}~
~Shell32.dll,ShellExecuteW,"double word",,long,0,"pointer to UNICODE string",$SHELL_VERB$,"pointer to UNICODE string",$SHORTCUT$,long,0,long,0,long,0,$~
~mIDEFunc.dll\mEXEFunc.dll~
~Set Variable~
~{F4C4329C-DA2E-400A-96F4-54A586872BA8}~
~SHORTCUT$MYAH$MYAH$FALSE~
~$SHORTCUTFOLDER$\WinDiff~
~Set Variable~
~{382834E3-8AA4-4921-92D5-F2705E684381}~
~SHELL_VERB$MYAH$MYAH$FALSE~
~taskbarunpin~
~End~
~{A296AA3E-6D86-4F7F-977D-98121ED21FBD}~
~Set Variable~
~{93EF7A06-43E0-458F-8B03-98B80B4AD193}~
~SHORTCUTFOLDER~
~$SHORTCUTFILES$\$STARTMENU$~
~Else~
~{AE26F2A6-AF2E-4886-A83A-6ABFB8A6C125}~
~Set Variable~
~{782E0C18-5354-4FF3-B15F-BC743ED72E73}~
~SHORTCUTFOLDER$MYAH$MYAH$FALSE~
~$SHORTCUTFILESALL$\$STARTMENU$~
~If~
~{281CC48E-2EBC-4BD7-AEA6-94D8CC9D7E7E}~
~ALLUSERS~
~0~
~TRUE~
~FALSE~
~Get Folder Location~
~{220CBB78-9756-4E16-BB98-907E5B81A5B8}~
~SHORTCUTFILES~
~14~
~FALSE~
~Get Folder Location~
~{87B71917-A459-4211-8771-9989BE997889}~
~SHORTCUTFILESALL~
~14~
~TRUE~
~Set Variable~
~{516B4994-698E-4F6A-AE42-CEEEA3A0AA3A}~
~STARTMENU~
~$TITLE$~
~If~
~{C1EC70A2-86A3-4420-8A3C-3050D16C45BF}~
~IS_WIN7~
~0~
~TRUE~
~FALSE~
~Comment~
~{6F88143F-D8FB-4904-B040-137DD68ACCCD}~
~~
~Get System Settings~
~{4CB256C3-1B9B-44A4-82DF-2F489ED99C81}~
~IS_WIN7~
~79~
~Set Variable~
~{1895A368-D135-4A2B-899D-2D143A997A29}~
~IS_WIN7$MYAH$MYAH$FALSE~
~FALSE~

ANSI VERSION

Code: Select all

~InstallAware Clipboard Data~
~End~
~{B240157F-EC1D-4FC9-909A-BF2A541C1C44}~
~Call DLL Function~
~{BEDAA162-0B01-407E-86D0-EF45B02BC4A0}~
~Shell32.dll,ShellExecuteA,"double word",,long,0,"pointer to string",$SHELL_VERB$,"pointer to string",$SHORTCUT$,long,0,long,0,long,0,$~
~mIDEFunc.dll\mEXEFunc.dll~
~Set Variable~
~{6370EB50-3171-4002-B684-A5331999BC07}~
~SHORTCUT$MYAH$MYAH$FALSE~
~$SHORTCUTFOLDER$\WinDiff~
~Set Variable~
~{8B83DB1D-D50A-4EB6-858A-6E3DBCF22276}~
~SHELL_VERB$MYAH$MYAH$FALSE~
~taskbarunpin~
~End~
~{EED38A5B-2A02-4446-8586-6AE2175EE099}~
~Set Variable~
~{33E02516-DA80-482A-8F57-E9F1005FB25E}~
~SHORTCUTFOLDER~
~$SHORTCUTFILES$\$STARTMENU$~
~Else~
~{81F66B31-CE62-416E-B59E-FA3BC49AB3A5}~
~Set Variable~
~{7C19FBE4-81E6-4360-B40D-E6ABEE1F8539}~
~SHORTCUTFOLDER$MYAH$MYAH$FALSE~
~$SHORTCUTFILESALL$\$STARTMENU$~
~If~
~{551FF06A-48C0-456F-AF4C-79595DEB143D}~
~ALLUSERS~
~0~
~TRUE~
~FALSE~
~Get Folder Location~
~{74C03E95-C5E1-45A6-9E23-4513E88DB538}~
~SHORTCUTFILES~
~14~
~FALSE~
~Get Folder Location~
~{A653531B-D8A8-414C-B062-CE346CC76E30}~
~SHORTCUTFILESALL~
~14~
~TRUE~
~Set Variable~
~{91D73339-9974-41D5-8B7A-6E56ACEAE682}~
~STARTMENU~
~$TITLE$~
~If~
~{FB05B23D-FB32-4ED9-908D-F3D42EEE9CA2}~
~IS_WIN7~
~0~
~TRUE~
~FALSE~

I use the same and works fine!

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 119 guests