Kill MS Access

  • Thread starter Thread starter Mike
  • Start date Start date
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.
 
A bat file runs an Access 97 macro which in turn prints
off some reports. The macro finishes but doesn't close
Access.
 
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.
 
Back
Top