Task Scheduler opens Access in hidden and does not run the code in it
-
Tuesday, December 04, 2012 5:06 PM
Hello,
I have set a task to run an Access database. As I red on many forums, I had to create a .bat file that has a command to start Access.
The problem is that I see the two processes (cmd and MSACCESS) launched by the Task Scheduler in the Windows Task Manager, but don’t see them in the running application nor in the task bar. I also inserted a loading form that displays a msgBox on loading. And I never see this message coming.
However, if I double-click on the batFile, the access database launches correctly and I am able to see my msgbox.
Thank you for any suggestion.
PS:
The bat file contains:
start “” “msaccess” “\\myFileServer\MyDB.accdb”
pause
Here are the settings I’m using in the task scheduler:
General:
- Run whether user is logged on or not
- Do not store password. => [Unchecked]
- Run with highest privileges => [Unchecked]
- Hidden => [Unchecked]
- Configure for: Windows 7, Windows 2008 R2
Trigger:
- Begin the task: on a schedule
- Weekly
- Start 28.11.2012, 08:00:00 Synchronize across time zones => [Unchecked]
- Recur every 1 weeks on week days
- Display task for up to (random delay) => [Unchecked]
- Repeat task every => [Unchecked]
- Stop all running task at end of repetition duration => [Unchecked]
- Stop task if it runs longer than => [Unchecked]
- Expire => [Unchecked]
- Enabled => [Checked]
Action:
- Action: Start a program
- Program/script: “\\myFileServer\RunMyDB.bat”
- Add arguments (optional): [Empty]
- Start in (optional): [Empty]
Conditions:
- Start the task only if the computer is idle for => [Unchecked]
- Stop if the computer ceases to be idle => [Unchecked]
- Restart if the idle state resumes => [Unchecked]
- Start the task only if the computer is on AC power => [Unchecked] (It’ desktop PC)
- Stop if the computer switches to battery power => [Unchecked]
- Wake the computer to run this task => [Checked]
- Start only if the following network is available: => [Unchecked]>
Settings:
- Allow task to be run on demand => [Checked]
- Run task as soon as possible after a scheduled start is missed => [Unchecked]
- if the task fails, restart every: => [Unchecked]
- Stop the task if it runs longer than => [Checked]: 12 hours
- If the running task does not end when requested, force it to stop => [Checked]
- If the task is not scheduled to run again, delete it after: => [Unchecked]
- If the task is already running, then the following rule applies: Do not start a new instance.
Using Office 2007 on Windows7.
All Replies
-
Tuesday, December 04, 2012 5:56 PMTo make scheduled tasks visible you must schedule them under your current logon account.
-
Wednesday, December 05, 2012 11:17 AM
I did schedule them under my current logon account.
The solution is:In general settings: Check [Run only when user is logged on] instead of [Run whether user is logged on or not].- Marked As Answer by Warrio MW Wednesday, December 05, 2012 5:49 PM
-
Thursday, December 06, 2012 3:19 AMModerator
Hi,
Thanks for sharing. We really appreciate your time and efforts. Hope your experience will help other community members facing similar problems.
Spencer
TechNet Community Support- Proposed As Answer by Johnnie Sko Thursday, March 21, 2013 5:15 PM


