Kill MS Access

M

Mark V

In said:
whats the best way to kill the process msaccess.exe
through the command line?

If you have the Resource Kit or the Support Tools installed, kill.exe.
Otherwise, any process killer such as (free) PSKILL.EXE from
Sysinternals should do.
pskill msaccess.exe

But note please that killing a database manager could lead to data
corruption or damage to the DB. There may be other methods to close
down Access that are more forgiving. Perhaps you can say why you would
need to "kill" it.
 
G

Guest

A bat file runs an Access 97 macro which in turn prints
off some reports. The macro finishes but doesn't close
Access.
 
D

Dave Patrick

Add the line
Application.Quit
to the end of the sub procedure.

Else last resort this VBScript should work.
---------------------------
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcessList = objWMIService.ExecQuery ("Select * from
Win32_Process Where Name = 'msaccess.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
---------------------------
Watch for line wrap.


--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


|A bat file runs an Access 97 macro which in turn prints
| off some reports. The macro finishes but doesn't close
| Access.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

"IBM wants to kill the hard drive it invented" 5
Kiling a runing program? 2
Comodo Firewall help 5
Parse Field 21
kill 3
Problem with Kill Syntax! 1
MSACCESS.EXE in TaskManager 3
Taskkill problem... 1

Top