Jack and Pat
drawbridgej at sympatico.ca
Fri Jan 9 09:25:28 CST 2009
That is great. Works fine and is sure short and sweet on XP SP3 A2003 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of James Barash Sent: Friday, January 09, 2009 9:35 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] A2003:See if an EXE Is running Here is what I've used. It should work under Windows XP and Access 2003, at least that the only place I've used it. Hope it helps. James Barash Public Function IsExeRunning(strExeName As String) As Boolean Dim objProcesses As Object, objProcess As Object IsExeRunning = False Set objProcesses = GetObject("winmgmts://" & Environ$("ComputerName") & "/root/cimv2").ExecQuery("select * from Win32_Process") If Not objProcesses Is Nothing Then For Each objProcess In objProcesses If objProcess.Name = strExeName Then IsExeRunning = True Exit For End If Next Set objProcess = Nothing Set objProcesses = Nothing End If End Function ---------------------------------------- > From: darren at activebilling.com.au > To: accessd at databaseadvisors.com > Date: Fri, 9 Jan 2009 10:47:45 +1100 > Subject: [AccessD] A2003:See if an EXE Is running > > Hi team > > > > I need some code to see if XYZ.exe or ABC.EXE is 'running' or not (EG > notepad.exe) > > I have found some stuff in VB but am not able to get it to work. > > I was just wondering if anyone has done this in Access and is able to share :-) > I basically want to see if an app is 'running' then simply report True or False > back to my access app. > > I don't want to open or close this app - just see if it's 'running' > > Many thanks in advance > > > > DD > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com _________________________________________________________________ Windows LiveT: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.10.5/1881 - Release Date: 1/9/2009 8:38 AM