Link to home
Create AccountLog in
Avatar of LeviDaily
LeviDailyFlag for United States of America

asked on

Clear GHOST icons in sysagent

We have a batch file that runs an application then closes it. when it closes the process, the icon stays in the taskbar. The only way to clear it is to highlight the icon. Is there any to add a command in the batch file to clear the icon from the sysagent?
ASKER CERTIFIED SOLUTION
Avatar of and235100
and235100
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of LeviDaily

ASKER

Ok. The problem is that this is Online Backup software. The built-in scheduling software WONT work. So I created a batch file to call on the backup set and set it with Windows Scheduler. It works perfect. the problem is after the backup runs, I have the taskill kill the process. After that it shows the icon..and never goes away. I want to be able to throw a command in the batch file to clear it up, but I didnt understand the post you just posted. Sorry, I am NOT a programmer and know nothing about that ..SORRY

taskkill /F /IM Backup.exe /T
taskkill /F /IM TrayControl.exe /T
Neither am I, but I saw this - and think that might be useable.
There is no way that you can just run this type of thing from a batch file.
And - the code given would have to be incorporated into a program - the only other way would be for the mouse to be moved over the area automatically - as described in the link.

Sorry I can't be of more help. As far as I am aware, unless you programatically do this - it cannot be done from a simple script...

Avatar of RobSampson
Hi, I have no idea if this will work, but what you run this VBS file after the backup program closes, which runs your TaskKill commands, and attempts to activate the crashed window:

You will need to change strWindowTitle to match the exact window title of the icon when it crashes.

Regads,

Rob.
Set objShell = CreateObject("WScript.Shell")
strCommand = "cmd /c taskkill /F /IM Backup.exe /T"
objShell.Run strCommand, 0, True
strCommand = "cmd /c taskkill /F /IM TrayControl.exe /T"
objShell.Run strCommand, 0, True
strWindowTitle = "Backup Program"
On Error Resume Next
objShell.AppActivate strWindowTitle
On Error GoTo 0
Set objShell = Nothing

Open in new window

Didnt work.