Hi,
Whats the task, some are critical to windows, also what version of windows are you on. You should intentify the item your trying to close. If its a service you can stop the service instead. If you think its a virus, you might have better luck logging in a as different user, or logging in under safe mode, then doing your virus scan.
Regards,