Start agents as applications

For some devices (for example TIA Portal with software upload) it is necessary that agents are started as applications instead of only as services. If the service is started as an application, it behaves in the same way as a manually started application (for example a web browser).

To start a service as an application, follow the steps in A or B. You have the option in option A (create a shortcut) to set the program to run as administrator. If you then place them in the startup folder (A), you can automate the execution.

Before the MasterService or the agents can be started as an application, you need to ensure that the agent services (VDogUploadAgent and VDogVCompareAgent) have been ended. This can be done for example with the Task Manager. Afterwards, you will need to deactivate these services in Windows. This ensures that these services are not automatically restarted after a reboot of the computer.

A. Create a shortcut

  1. Open Windows Services and view the properties of the Agent service.
  2. Copy the path to the service into an editor, for example Notepad.
  3. Adjust the path based on the description that corresponds to your Windows version:

    1. Windows 10 and Windows Server 2016:
    2. Example:

      Copied path:

      C:\Program Files (x86)\vdogAgents\VDogCompareAgent.exe" /at:s /rd:D:\vdAgentArchive

      New path.

      Powershell Start-Process -Verb Runas
      -FilePath 'C:\Program Files (x86)\vdogAgents\VDogCompareAgent.exe'
      -ArgumentList '/RD:D:\vdAgentArchive','/AT:S','/app','/visible'

      Be sure to replace double quotes (") with single quotes (').

    3. Older Windows versions:

    4. Example:

      Copied path:

      "C:\ProgramFiles(x86)\vdogAgents\VDogCompareAgent.exe" /at:s /rd:D:\vdAgentArchive

      New path:

      "C:\ProgramFiles(x86)\vdogAgents\VDogCompareAgent.exe" /at:s /rd:D:\vdAgentArchive /app /visible

      The /visible addition opens an application dialog for the process. This entry is optional.

  4. Create a new shortcut (for example to your desktop).
  5. Paste the copied (and adjusted, if necessary) path in the field of the dialog.
  6. Create link dialog

    Image: Create link dialog

  7. Click Next and name the shortcut.
  8. Click on Finish.
  9. If you are running an operating system older than Windows 10 or Windows Server 2016, follow these steps:

    1. Open the properties of the shortcut you just created.
    2. In the Compatibility tab, click Change settings for all users.
    3. Check the checkbox Run program as administrator.
    4. Properties VDogCompareAgent.exe

      Image: Properties VDogCompareAgent.exe

  10. If you want the agent to run automatically, perform the following steps:

    1. Move the shortcut to the Startup folder, usually C:\Users\auvesy\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
    2. In the User Account Control settings, select Never notify to avoid displaying a User Account Control (UAC) prompt after automatic login.

    3. If the User Account Control (UAC) prompt cannot be turned off, it is not possible to run the shortcut automatically as an administrator. The shortcut must then be manually executed again by the Windows user after each restart.

B. Via the command line

  1. Enter the following commands (depending on your application):
  2. "C:\Program Files (x86)\vdogAgents\VDogCompareAgent.exe" /at:s /rd:D:\vdAgentArchive /app

    "C:\Program Files (x86)\vdogAgents\VDogUploadAgent.exe" /at:s /rd:D:\vdAgentArchive /app

  3. To automate the execution as an application, create a batch file, copy the path in the file and copy the batch file to the autostart folder. Each batch file can contain only one path.
  4. Start the agent application by right-clicking on the batch file and selecting the Run as administrator option.

This procedure can also be used for the MasterService.