I have precisely the same situation as you describe with an app I put together when I first began working here. I should have asked the list for guidance, as you have done, but for some reason that now esacpes me (lack of time, maybe, or lack of confidence - I had not long been using Delphi) I decided to work around the problem. My reason for wanting to know if instances of the app were still running was that I needed users to close it before going off for the evening in case I had to carry out maintenance on the exe. Putting a request round to all users to ensure that they closed it at the end of the day had little effect as you might expect, so I incorporated an automatic closedown function within it, which is triggered at a certain time, I think 5.30 pm, when all staff who use the app have finished for the day. A 60 second warning is shown on screen along with a button which offers the user the capability of overriding the automatic shutdown just in case there is someone who needs to continue working.
Although this fudge has operated without mishap for almost five years, your mail reminded me that I should really consider doing the job properly (if not with the aforementioned app, which is nearing the end of its life, then with others in future), so I'll be interested to see the replies you get! Regards Steve -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: 02 January 2008 19:43 To: [email protected] Subject: [delphi-en] How many instances of EXE running on Windows network? Happy New Year! Delphi 5 Windows local area network. How do I determine if any other instances of my EXE are running on the network? Each is started from the same common folder. My program already manages a "session table". But sometime my program fails and exits abnormally, so the session table entry does not get deleted. I wish for a routine that would poll or otherwise determine somehow "in real time" if there are truly active instances of the same EXE alive on the network. Not sure which set of windows API calls I should be looking at. Many thanks in advance. *************************************************************************** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***************************************************************************

