Avast WEBforum

Consumer Products => Avast Free Antivirus / Premium Security (legacy Pro Antivirus, Internet Security, Premier) => Topic started by: ManChesTer on September 28, 2004, 11:02:44 PM

Title: After installing WinXp Sp2 FR the avast icons on Trayicon disaper
Post by: ManChesTer on September 28, 2004, 11:02:44 PM
Hi, i'm using avast from a couple of months, no problems

But yesterday, M$ need to put sp2 of xp on my machine, i accept, now the system no more have the avast icons on windows tray....

the avast services appers starteds, they are on process manager, hat's  happend ?

I have reinstalled avast, no change, no icons  :'(

Thanks to answer

ManChesTer.
Title: Re:After installing WinXp Sp2 FR the avast icons on Trayicon disaper
Post by: Lisandro on September 28, 2004, 11:38:26 PM
Did Windows Security Center recognized avast?
What version of avast do you have? Is 4.1.418?
Title: Re:After installing WinXp Sp2 FR the avast icons on Trayicon disaper
Post by: ManChesTer on September 29, 2004, 01:36:11 AM
Yes it's the last version...

And xp Security Center is down because i have hardware firwall...

Before using sp2 the same version of avast works fully ok,i think i's a port acces problem...

Thanks.

ManChesTer.
Title: Re:After installing WinXp Sp2 FR the avast icons on Trayicon disaper
Post by: ManChesTer on September 29, 2004, 01:48:45 AM
I just try a test, it was funny..

when i go to the avast directory "C:\Program Files\Alwil Software\Avast4", if i run "ashDisp", everything work well...

can i put it in the menu=>start folder ?

Thanks for your answer

ManChesTer.
Title: Re:After installing WinXp Sp2 FR the avast icons on Trayicon disaper
Post by: ManChesTer on September 29, 2004, 01:50:36 AM
Erf, no not working ;o((

when i go to the icon with the mouse, the icons goses invisible....

verry strange...

ManChesTer.
Title: Re:After installing WinXp Sp2 FR the avast icons on Trayicon disaper
Post by: Lisandro on September 29, 2004, 02:55:46 AM
And xp Security Center is down because i have hardware firwall...

Before using sp2 the same version of avast works fully ok,i think i's a port acces problem...

I bet on a firewall problem. Can you see both the hardware one and if the Windows build-in firewall enable avast to connect the Internet?

ashDisp.exe is the 'icon', the interface by system tray. You could add a link to it, although if you have XP it should not be necessary  ::)
Title: Re:After installing WinXp Sp2 FR the avast icons on Trayicon disaper
Post by: bob3160 on September 29, 2004, 04:15:35 AM
ManChesTer
Click on the link in my signature and find ReZoR's Tool Avast! External Control (AEC).
Run it and select General Tweeker and follow the example.
Title: Re:After installing WinXp Sp2 FR the avast icons on Trayicon disaper
Post by: ManChesTer on September 30, 2004, 08:48:18 PM
Ok, i check some thinks on sp2, i fond the problem....

The tray is modified in windows XP SP2 :

see:
 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shell_notifyicon.asp

Perhaps the function NIM_MODIFY do not work sometimes...
This is a solution (in delphi, ca be traduct without problem) :

(c)ManChesTer.

var Nicon : TnotifyIconData;

Function Put_Icon_On_Tray(IconName:String) : Boolean;
begin
 Result:=true;
 if not (Nicon.hicon<>0) then // if icon handle is nil
  Nicon.hicon:=LoadIcon(HInstance, Pchar(IconName)); // load icon from resource
 if Nicon.hicon=0 then // if still not loaded
 begin
  Nicon.hicon:=LoadIcon(HInstance, Pchar('ERROR_ICON')); // load error icon
  Result:=false;
 end;
 Shell_notifyicon(NIM_delete,@Nicon); // delete old icon if already on the tray...
 Application.Processmessages; // process all messages !!! important for some windows versions
 If not Shell_notifyicon(NIM_Add,@Nicon) then  // put the new icon on the tray
  result:=false;
 Application.Processmessages; // process all messages !!! important for some windows versions
end;

Function Remove_Icon_on_Tray:Boolean;
begin
 Result:=False;
 if Shell_notifyicon(NIM_delete,@Nicon) then // delete old icon if already on the tray...
  Result:=True;
 Application.Processmessages; // process all messages !!! important for some windows versions
end;

App sample:

If my_app_is_running then
 if not Put_Icon_On_Tray('My_ICON') then
  showmessage('Error Error on resource or notray in this windows');
else
 if not Put_Icon_On_Tray('My_NOTWORK_ICON') then
  showmessage('Error Error on resource or no valid tray in this windows');

To remove the icons:

if Remove_Icon_on_Tray then
 showmessage('Tray Icon removed...')
else
 Showmessage('Error when remove Tray icon');

To modify the icon:

 if not Put_Icon_On_Tray('New_ICON') then
  showmessage('Error Error on resource or no valid tray in this windows');

I hope this is helpfull for you....

In a friendly way,

ManChesTer.
Title: Re:After installing WinXp Sp2 FR the avast icons on Trayicon disaper
Post by: bob3160 on September 30, 2004, 10:32:49 PM
ManChesTer:
Did you try the utility I suggested?
Title: Re:After installing WinXp Sp2 FR the avast icons on Trayicon disaper
Post by: ManChesTer on October 01, 2004, 09:18:49 PM
Yes i have tryed this utility, no effect...

But i know exactly when this happend it's when you have the french .net framework 1.1 instlled , if i remove the last version of .net framework, all work's well...

Ps : with the sample code in this post this not append, if i do the same with NIM_MODIFY this append on my applications too...


Good Work

ManChesTer.