[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 534
  • Last Modified:

Account-Related Issue opening Access 2007 from Scheduled Task

I am migrating an existing Scheduled Task from a server in one domain to a server in another domain. The servers are both running Windows XP Standard Edition, SP2. I have Active Directory Service accounts, created specifically for the task, in each domain. I also have Microsoft Access 2007 on both servers. The task runs a macro in an Access dbs via a .bat file. The .bat file is essentially as follows:

E:
CD\Program Files\Microsoft Office\Office12
Msaccess.exe "E:\program files\myDBS.mde" /WRKGRP "E:\program files\myDBS.mdw"/x macroName
exit

I can't get the Scheduled Task to run in the new domain with the new service account. If I use MY personal Active Directory account, it runs fine. If I use my Service Account, nothing. I've narrowed it down to my service account not being able to open Microsoft Access. I did this by streamlining the .bat file as follows:

E:
CD\Program Files\Microsoft Office\Office12
Msaccess.exe
exit

My personal account will open Access fine. The service account will not. I also verified that the Service Account WILL run Scheduled Tasks. I wrote a simple .bat file that just changes a file extension, and my Service Account WILL run that Scheduled Task. It just hangs when it tries to open Access.

Another odd thing I've noticed is that on the existing installation, when the Scheduled Task runs, it does NOT visually open Microsoft Access. It seems to run the macro in the background. But on the new server (new domain), when I get the Service to run under my personal account, it physically opens Access, runs the macro, then closes Access. I'm not sure if that's relevant or not so am including it.

My Service Account is an Administrator on the server. It seems to have the same permissions on the server as my personal account. Any ideas? I'm hoping there's a security feature in Access 2007 that I'm missing? Thanks for any help/ideas!
0
oneDayAtaTime
Asked:
oneDayAtaTime
  • 2
2 Solutions
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I suppose it's possible the Service Account is corrupt - have you tried doing this with another Admin-level account?

Can the service account open other items, like notepad.exe, through the bat file or scheduled tasks? If it can, then there may be issues with the installation of Office/Access on the server. Be sure that you've installed all updates and service packs to Office/Access, as well as to Windows.

Just a note: You don't need to include the /wrkgrp switch when opening your database, since you're not also including a username/password. Otherwise, this construct:

Msaccess.exe "E:\program files\myDBS.mde" /WRKGRP "E:\program files\myDBS.mdw"/x macroName

would simply hang, since Access would try to open with the myDBS.mdw security file, which would presumably require you to log in.
0
 
oneDayAtaTimeAuthor Commented:
Thanks for the info, LSMConsulting. I didn't know that about the /wrkgrp switch.

I figured out my problem. It was a combination of several things.
1) New installation of Access required my Service Account to enter its name/initials. I had to log onto the server as my Service Account and open Access to get past that annoying pop-up.
2) New installation of Access required my database location AND the location of Office12 to be added as Trusted Locations in the Trust Center. These settings had to be made logged in as the Service Account user.
3) Under Access Options (still logged in as my Service Account), made sure new installation of Access had the same settings for "Current Database" as my old setup.
4) NOW, when I log into the server with my personal account, the Scheduled Task will run under the Service Account. The Service Account can now open Access without pop-ups that require a response, thus it runs "behind the scenes" and does not visually open Access.
0
 
oneDayAtaTimeAuthor Commented:
I was able to resolve the issue, and included the details in my comments.
0

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now