Automate Microsoft Access Database Tasks as a Windows Service

Total Visual Agent can run as a standard Windows program or as a "hidden" Windows Service to execute your scheduled tasks in a secure and robust manner.

Windows Services Offer Secure and Robust Performance

A Windows Service can run even without a user logged on to the computer, providing increased security and automated restart if the machine crashes.

The Total Visual Agent Service runs in the background, waiting for the appropriate time to execute scheduled Actions. Simply schedule the tasks you want, and let Total Visual Agent take care of it forever. Since it is a Windows Service, it does not require a user to be logged on in order to run its scheduled events. There's no need to keep your machine open and unattended while processing your events.

Contents


Total Visual Agent includes a Service Control Manager to help you manage the Service. Open the Service Control Manager from the Windows Start menu:

Launch the Total Visual Agent Service
Launch the Total Visual Agent Service

The Service requires Administrator rights if you want to modify its status. If you are not logged in as the Administrator, a confirmation form appears. Click on Yes:

Launch the Service with Run as Administrator
Confirm it can be Run as Administrator

The Service Control Manager displays this form:

Total Visual Agent Service Control Manager
Total Visual Agent Service Control Manager

The Service Control Manager works with the Windows Service to let you turn the Service on and off, and see what it’s doing. Press [Start] to run it. The "Current Processing Activity" section displays information about the Service’s current activity. When the Service processes an Event, this section displays the Item and Action that is being processed.

The Total Visual Agent Service is a standard Windows Service managed by the Services app. From Windows, search on Services and click on the app:

Microsoft Component Services for Total Visual Agent
Setting the Total Visual Agent Service Properties from the Windows Services App

Total Visual Agent Service Properties

Locate the service named “Total Visual Agent 2021 Service", right-click and select "Properties", or double click on the service to open the Properties window.


General Tab to Set Startup Type to Automatic (Delayed Start)

The General tab provides options for starting, pausing and stopping the Service:

Wndows Service General Tab for Automatic (Delayed Start)
Total Visual Agent Service, General Properties

Set Startup Type to Automatic (Delayed Start)

Change the startup type from Manual to Automatic (Delayed Start). This automatically launches when Windows is rebooted and ensures your events are processed after the machine recovers from a power failure, Windows update, or other Windows restarts.

Automatic versus Automatic (Delayed Start)

We recommend using Automatic (Delayed Start) versus Automatic because Windows has a limited amount of time (by default, only 45 seconds) to load all its Automatic services.

Depending on the number of other services and any delays with them, if Total Visual Agent is set to Automatic, Windows may never get to it within that time period, so it won't even try to start it.

Using Automatic (Delayed Start) allows it to be launched after Windows starts all the Automatic services without a time limit.


Log On Tab

The Log On tab provides options for how the Service logs on to the system.

  • Select "Local System Account" to specify that the Service logs on to the local system account. This is appropriate if Total Visual Agent is only working with files on that machine.
  • If Total Visual Agent processes protected local files and folders, or network files, you need to specify a specific user account with the appropriate permissions.

Total Visual Agent Service, Local Log On Properties
Local Log On Properties

Total Visual Agent Service, Network Log On Properties
Network Log On Properties


Recovery Tab

The Recovery tab provides options for how the Service behaves if it fails:

Total Visual Agent Service, Recovery Properties
Total Visual Agent Service, Recovery Properties

If the Service fails to start, consider restarting it, or running another program to notify you of the failure.

The challenge with running a Windows Service is that a service has no user interface. If an error occurs, the program cannot prompt you with the problem and it may just shut down or hang. There are a few ways to diagnose such problems.

Check Your Activity Log for Errors

From the Manager, look at the Activity Log to see if any errors were encountered (check Errors Only). The descriptions may help you identify the problem. The log is in an Access database, so you can open it directly to view and filter the data.

Make Sure Email Notification is Activated

Total Visual Agent has an email notification system to send alerts to you in the event something goes wrong. It uses standard SMTP email settings that are set from the Total Visual Agent Manager under the Tools, Options menu, Error Alert Mail Settings tab:

Email Notification from Total Visual Agent
Email Notification Settings to Activate Email Alerts

With email notification, you will receive emails when unexpected errors occur. Make sure to test your email settings to verify this is working.

Test Your Actions Individually

From the Total Visual Agent Manager where you create your actions, test them individually to verify they work. This should be done before adding them to a schedule.

Make sure you log into Windows with the same user name that the Service is configured on its Log On tab. Users may have different permissions, drive mappings, and other settings that allow the Total Visual Agent Manager to run a task successfully, yet fail in the Service.

Verify the Monitor Works

After confirming the tests on the individual tasks and before running it as a Windows service, launch the Monitor to ensure it is scheduled properly and the tasks work together.

Launch the Total Visual Agent Monitor
Launch the Total Visual Agent Monitor

Unlike the Service, the Monitor has a user interface if it encounters unexpected errors.

Monitor Status in Total Visual Agent

The Monitor performs your scheduled tasks identical to the Service so there is no difference in functionality. However, if a problem occurs in the Service, it can just quit or hang without telling you why. The Monitor helps troubleshoot issues, so run it for a few of your scheduled cycles to ensure there are no problems before using the Service.

Database Not Found Error

If the Monitor runs and the Service fails with errors claiming it can't find databases, make sure your databases (and other folders and files) are referenced by Universal Naming Convention (UNC) format (e.g. \\server\folder\) rather than mapped drive letters.

References to local drive letters should be fine, but mapped network drives may not be initialized for the login used by the Service. UNC paths should always work.

This could also indicate the Windows user name when running the Monitor is not the same as the logon for the Service. The tests for the Manager, Monitor and Service are not conclusive if different Windows names are used among them.

Service Doesn't Start on Windows Reboot

Verify the Service Runs

From the Services, General Tab, press the [Start] button (or start it from the Total Visual Agent Service Launcher)

  • If it runs, it proves the Total Visual Agent Service works and it's a startup problem on reboot.
  • If it fails, the problem is not just with the reboot. Follow the steps above to make sure the Monitor runs, then revisit trying to run it as a Service.

Make sure the Service is set to "Automatic (Delayed Start)" and not "Automatic"

Services failing to start are documented as Errors in the Windows Event Viewer under Windows Logs, System. A timeout error looks like this:

The Total Visual Agent 2021 Service service failed to start due to the following error: 
The service did not respond to the start or control request in a timely fashion.

This can happen if the service is set to Automatic instead of Automatic (Delayed Start). All the services set to Automatic need to be loaded in a limited amount of time or they are skipped. If there are too many other Automatic services or any of them have a problem that causes a delay, Windows won't even try to start the Total Visual Agent Service if it's after the time limit. Delayed Start ensures the PC has time to load the Total Visual Agent service.

Total Visual Agent User manual

Version 2021 is shipping!

New Features

With Windows Service!
Supports: All Access, Jet Engine, and Visual Basic versions


View all FMS products for Microsoft Access All Our Microsoft Access Products

Reviews

"Total Visual Agent is a real find, a rare combination of ease of use, and bang for the buck. In the end, no other competitor even comes close."

Thomas Wagner, Product Review in MS Office and VBA Developer

More Awards & Reviews

Agent Info

Related Resources

Additional Info

 

 

Free Product Catalog from FMS