'Kill MSAccess process via batchfile
I am trying to open MS access have a delay of about 5 seconds then close the application.
With the .bat file below I have the program opening but I can not get it to close after the delay.
@echo off
start /B "Access" "C:\Program Files (x86)\Microsoft Office\OFFICE14\MSAccess.exe"
"G:\Departmental Submissions\Cardiac Rehab\Cardiac Rehab.accdb"
wait -n 5
TASKKILL /F /IM MSAccess.exe
Solution 1:[1]
the third reply on this indicates that you have to write a startup script to close it....
To get the database to close you need to write a Startup function which controls
all the events you wish to run and then use Docmd.Quit,
Solution 2:[2]
You could use a sysinternals tool called pskill. I have a batch file that stops several processes and services for a legacy app we use. To kill MSAccess using pskill you could write START C:\SI\pskill -t msaccess.exe.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Jim |
Solution 2 | m1yag1 |