Windows Agents

Troubleshoot how to get a Naverisk Agent back online when it is showing as offline in your Naverisk Portal.

Updated over a week ago

Introduction

This guide covers some methods that can be used to get a Naverisk Agent back online when it is shown as offline in your Naverisk Portal

Ideally the Naverisk Agent should always be online, however there are other environmental factors (Network Configuration, Operating System, and Conflicting Software) that can cause Agents to go offline which we can’t account for as these variables change constantly. Should you experience an offline Agent, please send through the Naverisk Log files of the offline Devices and report this issue. 

Ultimately, you need to get your Agent back online and monitoring your customer. We have provided a few steps that can assist in getting the Naverisk Agent back online in a timely manner. Please do remember that the Naverisk Agent adheres to the same rules as other Services within a Windows system

1.0 Rebuilding the Naverisk Agent

Before considering removal of any Naverisk Agents that may be experiencing issues try rebuilding the Naverisk Agent first. Rebuilding the Agent is the quickest and easiest way to get your Agent back online with little or no disruption to your customer. A rebuild Agent will reinstall the Naverisk Agent fresh, but without creating a new Device in your portal. It will retain all configuration settings and historical data. In Naverisk: 

  1. Click on the Devices Tab

  2. Select the correct client from the list on the left hand side

  3. Select the problematic Agent

  4. Select ‘Rebuild Agent’ from the Select a Task drop-down on the right hand side.

2.0 Manually Removing Naverisk Agents

If you wish to remove a Naverisk Agent in the event that the Agent cannot be uninstalled via the Naverisk portal via the Add/Remove Programs within Windows or if you have taken on a new customer that was previously managed by another provider using Naverisk, you can remove the Agent manually by using SC commands or from add and remove programs .

From add and remove programs or programs and features in Windows 10, simply choose the Naverisk Agent and go Uninstall. This will remove the agent.

Or from the Command Prompt (with Administrator rights).

  • SC Delete NaveriskAgent

  • SC Delete NaveriskServiceMonitor

If it can't be removed this way then you can do the following.

Delete the following from the registry.

  • HKLM\SYSTEM\CurrentControlSet\services\

     -     NaveriskServiceMonitor
     -     NaveriskAgent
     -     Winvnc

Restart the Device and delete the following 2 Naverisk folders (OS Dependant).

  • \Program Files\Naverisk or \Program Files (x86)\Naverisk

  • \ProgramData\Naverisk or \Documents and Settings\All Users\Application Data\Naverisk

Now you can reinstall the agent if required.

3.0 Reinstalling an Agent

If you just want to replace the Agent that is currently running and installed on the Device, you can use a downloaded agent or command line with switches to overwrite the currently installed Device. This comes in particular handy when using the Rebuild Agent installer.

  • Download the Agent Installer and double click to re-deploy

  • Download the Agent Installer and run it with the following Command Line option:        -      /overwrite (please note this is for pre 2021 R1 only)

If the Naverisk Agent service is found already to be installed on that machine, this switch will tell the Agent Installer to overwrite the existing Agent. Otherwise, without this option the install will be aborted if an existing Agent is found.

4.0 Linking the Newly Installed Agent to the Original

This method is the manual version of the Rebuild Agent, however you may find situations where a manual rebuild Agent may be suitable instead of running the Agent installer. For example, manually needing to install a Naverisk Agent due to insufficient permissions when running the normal installer. As you would need to take a donor Agent from another Device with the Naverisk Agent installed and use SC Create to make the Naverisk services.

Once you have installed the new Agent you can edit the NAS.cfg on the Device, and change the Agent ID to connect back to the original. The NAS.cfg can be found here:

  • \ProgramData\Naverisk\Agent or \Documents and Settings\All Users\Application Data\Naverisk\Agent OS dependent.

Edit the NAS.cfg with the original Agent ID, you may want to confirm that the Client ID is correct as well.

  • AgentID=101

  • ClientID=411

You can find the old ID of the device by placing your mouse cursor over the old one in Naverisk

Once this has been modified then restart the Agent either via Naverisk or by restarting the NaveriskAgent service on the Device, this will pick up the new settings and connect it to the original.

Make sure it connects up to the old one in Naverisk correctly. You can then delete the new one that was created.

5.0 Agent Errors

5.1 Error 100 (note this only effects Upgrades to Windows 10)

This section outlines how to fix the Naverisk Agent should you encounter an issue when installing and receive an ‘Error 100’. This occurs quite often in Devices that have been upgraded to Windows 10 from a prior running OS. Microsoft places all applications into compatibility mode in order to ensure that it will work in Windows 10. This unfortunately causes an issue when trying to reinstall an Agent.

Please ensure you have checked that your User has the correct permissions to install the Naverisk Agent.

5.2 Check the Compatibility settings

First things to check is the Compatibility settings of the NAS.exe file of the agent.

This is located under: C:\Programs Files (x86)\Naverisk\Agent

To check the Compatibility settings, right click on the NAS.exe file and click Properties.

Click the Compatibility tab

Ensure Compatibility mode is turned off

If it is turned on, you will need to click on Change settings for all users to uncheck it. Then click on Apply.

Once saved, try running the Agent installer again.

5.3 Check for Stuck Services/Processes

Another reason for this is that the NAS.exe process has been locked by another application or is stuck by the service uninstalling.

To check this, ensure that your Naverisk services are not in a "stopping" state and are appearing correctly as in the image.

If the services say "Stopping" - try killing the NAS.exe process in Task Manager.

Then check the Services State again. They should either be completely stopped or removed. Then delete the NAS.exe file under C:\Program Files (x86)\Naverisk\Agent – if this cannot be deleted, please use a tool like SysInternal’s Process Explorer to find what exactly is locking the NAS.exe file.

Once you can delete the NAS.exe file – please try installing the agent again.  

5.4 Required Redist not Installed

On some of the older systems such as XP or Server 2003, you might get this error when attempting to install a Naverisk agent. This is due to some of the code libraries that we use not being available in these versions.

Please install "Visual C++ Redistributable for Visual Studio 2015" and afterwards you should be able to complete the Naverisk agent installation as intended:   https://www.microsoft.com/en-us/download/details.aspx?id=48145

5.5 Force Install the Naverisk Agent

If the above process fail, you can do a force installation of the agent.

Please be advised, this is only to be used as a last resort. If you cannot resolve the Error 100 with any of the above issues, it is advised to contract Naverisk Support before attempting the below.

  1. Remove any instances of the Naverisk Agent that attempted to install.

  2. In CMD prompt we will need to execute the below commands to remove the Naverisk Services:

     -     Sc delete NaveriskAgent
     -     Sc delete NaveriskServiceMonitor

   3. Copy the Agent folder from the Install Folder off of a Donor Device and                         copy/overwrite the Folder to C:\Program Files (x86)\Naverisk\Agent

4. Copy the Naverisk ProgramData folder located in C:\ProgramData\Naverisk from the Donor Device to the New Device overwriting the contents:

5. Navigate to C:\ProgramData\Naverisk\Agent and open the NAS.cfg in a Text Editor and modify the AgentID to -1. -1 means a new Agent.

6. Save the modified NAS.cfg.
7. Open CMD prompt and execute: 

  • sc create NaveriskAgent binPath= "C:\Program Files (x86)\Naverisk\Agent\NAS.exe" DisplayName= NaveriskAgent start= auto

  • sc create NaveriskServiceMonitor binPath= "C:\Program Files (x86)\Naverisk\Agent\ServiceMonitor.exe" DisplayName= NaveriskServiceMonitor start= auto

Copy the above into a text editor to ensure that the formatting is correct as per the below:

8. Check to see that the services are running, if not start the services.

If you copied the Agent folder from a Device that is under a different Client, look under that Client in your Naverisk instance and you will see that the Device under that Client in your Devices tab. You can then select the Device, select Move to a New Client from the tasks drop down.

You will be presented with the image below, choose the correct Client you wish to move the Agent to and select Move Agents. This will now move the Agent to the correct Client.

Did this answer your question?