Skip to content

Starting the agents as applications

For some devices (e.g. TIA Portal with Software Upload), it is necessary for agents to be started as applications instead of just as services. If the service is started as an application, it behaves in the same way as an application started manually (e.g. a web browser).

To start a service as an application, follow the steps under A or B. With option A (create a shortcut), you have the option of setting the program to run as an administrator. If you then place this in the start folder (A), you can automate the execution.

Info

Before the VDog MasterService or the agents are started as an application, you must ensure that the agent services (VDogUploadAgent and VDogCompareAgent) have been terminated. This can be done e.g. with the Task Manager. You must then deactivate these services in Windows. This ensures that these services are not automatically restarted after restarting the Computer.

A. Create a shortcut

  1. Open the Windows services and display the properties of the agent service.
  2. Copy the path to the service into an editor, e.g. Notepad.
  3. Adjust the path using the description that corresponds to your Windows version:

    1. Windows 10 and Windows Server 2016:
      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`
      

      Make sure that double quotes (") are replaced by single quotes (').

    2. Older Windows Versions:
      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
      

      Info

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

  4. Create a new shortcut (e.g. to your desktop).

  5. Paste the copied (and adjusted if necessary) path in the field of the dialog.

    Figure: Create link dialog

  6. Click Next and name the shortcut.

  7. Click Finish.
  8. If you are using an operating system older than Windows 10 or Windows Server 2016, proceed as follows:

    1. Open the properties of the shortcut you have just created.
    2. Click Change settings for all users in the Compatibility tab.
    3. Activate the Run program as administrator checkbox.

    Figure: VDogCompareAgent.exe properties

  9. If you want the agent to run automatically, carry out the following steps:

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

Info

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

B. Via the Command line

  1. Enter the following commands (depending on your use case):

    "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
    
  2. 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 only contain one path.

  3. Start the Agent application by right-clicking on the batch file and selecting the option Run as administrator.

Info

This procedure can also be used for the VDog MasterService.