Jump to content
Sign in to follow this  

Outlook 2003 on Vista SP1

Recommended Posts


Don't ask me why because I have not been able to get the to bottom of the issue but for some reason in the normal course of a day I am getting multiples of outlook.exe running with Outlook eventually falling over when it looses access to a mail box' To fix the problem I have been going into the Windows Task Manager and performing an 'End Process' on all occurances.

As a solution I have written the following code which works and leaves only one '1' occurance of outlook.exe running. Its a bit convoluted and was hoping that a code master could suggest a more efficient way of completing the task.

;//Close Multiple Occurances of Outlook [Vista Issue] Leaves 1 Running

Const $DefaultEmail = "Outlook"


Func _sStopEmailClient()

$PID = ProcessExists($DefaultEmail & ".exe")

If $PID <> 0 Then

$list = ProcessList($DefaultEmail & ".exe")

$s = $list[0][0]

For $i = 1 To $list[0][0]

If $s = 1 Then



ProcessClose($DefaultEmail & ".exe")

ProcessWaitClose($DefaultEmail & ".exe", 30)

$s = $s - 1




EndFunc ;==>_sStopEmailClient

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this