Resolving Issues with ABBYY Scanning Plugin Installation Requests

Symptoms

Users may encounter repeated requests to install the ABBYY Scanning Plugin despite previous installations.

"Install Scanning Plugin
To enable scanning install the Scanning Plugin."

Cause

One common cause of these symptoms is improper installation of the ABBYY Scanning Plugin. This can occur if the plugin was not installed with administrator privileges. To verify, check if the plugin files are present in C:\Program Files\ABBYY\ScanningPlugin.

Another potential cause could be network interference or antivirus software blocking the ScanningMonitorBR.exe process, causing it to become stuck or fail to run altogether.

Resolution

To resolve issues related to the ABBYY Scanning Plugin installation and operation, follow these steps:

  1. Verify Installation:
    Ensure that the ABBYY Scanning Plugin is installed correctly with administrator privileges. Check that the plugin files are located in C:\Program Files\ABBYY\ScanningPlugin.
  2. Address Network or Antivirus Issues:
    If network interference or antivirus software is suspected, configure the firewall or antivirus settings to allow the ScanningMonitorBR.exe process to run without interruption.
  3. Workaround Using BAT File:
    To handle exceptional situations where the plugin may not function correctly due to network or antivirus issues, an administrator can implement a monitoring BAT file:
  4. Create BAT File (ABBYYMonitorService.bat):
    @echo off
    setlocal EnableDelayedExpansion
    set DELAY=5
    set HTTPDELAY=10
    set STARTDELAY=10

    set URL=http://localhost:53633/abbyyscanplugin/getVersion
    set FILENAME=C:\\Program Files\\ABBYY\\ScanningPlugin\\3.0\\ScanningPluginBR.exe
    set EXECUTABLE=ScanningPluginBR.exe

    REM Define the path to the file
    set "StatusFile=%TEMP%\http_status.txt"


    rem Lets allow Windows to start the services
    timeout /t %startdelay% /nobreak > nul

    REM Infinite loop to continuously read and update the file
    :loop

    REM Clear the status variable before each read
    set "status="

    REM Update the status via URL
    powershell -Command "& { try { $response = Invoke-WebRequest -Uri '%URL%' -TimeoutSec %HTTPDELAY% -ErrorAction Stop; Write-Output $response.StatusCode } catch { Write-Output $_.Exception.Response.StatusCode } }" > "%TEMP%\http_status.txt"

    REM Read the first line from http_status.txt into the status variable
    for /f "usebackq delims=" %%A in ("%StatusFile%") do (
      set "status=%%A"
      REM Display the content of the variable (optional)
      echo HTTP Status: !status!
    )
    echo %status%
    if DEFINED status (
    echo "Status is defined"
    if "%status%" equ "200" (
    echo "DEBUG no need to do anything"
    ) else (
    echo "DEBUG need to start as status is %status%"
    rem Killing an old process
    tasklist /fi "imagename eq %EXECUTABLE%" 2>nul | find /i "%EXECUTABLE%" > nul
    if not errorlevel 1 (
    REM If process is running, kill it
    taskkill /f /im %EXECUTABLE%
    echo Process killed.
    )
    rem Starting the service slowly
    start "" "C:\\Program Files\\ABBYY\\ScanningPlugin\\3.0\\ScanningPluginBR.exe" /server
    timeout /t %startdelay% /nobreak > nul
    )
    ) else (
    echo "Not defined"
    rem Starting the service slowly
    start "" "C:\\Program Files\\ABBYY\\ScanningPlugin\\3.0\\ScanningPluginBR.exe" /server
    timeout /t %startdelay% /nobreak > nul
    )
    REM Wait for 1 second before reading again
    timeout /t %DELAY% /nobreak >nul
    REM Jump back to the loop label
    goto loop
    endlocal
    This BAT file continuously checks if the ScanningMonitorBR.exe process is running and attempts to start it if it is not. The delay values can be modified as needed, but please note that the service requires some time to start, and an HTTP request must also be allowed time to wait for a response. Therefore, one may choose to use the suggested values.
  5. Create VBS Script to Start BAT File Silently (ABBYYPluginMonitorStarter.vbs):
    On Error Resume Next
    Dim shell
    Set shell = CreateObject("WScript.Shell")
    shell.Run "C:\Automation\ABBYYMonitorService.bat", 0, True
    If Err.Number <> 0 Then
    WScript.Echo "Error: " & Err.Description
    Else
    WScript.Echo "ABBYY Monitor executed successfully."
    End If
    This VBScript (ABBYYPluginMonitorStarter.vbs) runs the BAT file (ABBYYMonitorService.bat) silently without displaying the command prompt window. 
  6. Implementation:
    Place ABBYYMonitorService.bat in C:\Automation (create this folder if it does not exist). Then, for each user, create ABBYYPluginMonitorStarter.vbs to start the BAT file without showing the command prompt window. The VBS script will appear in the Task Manager as wscript.exe. An administrator can start it manually to ensure that there are no permission-related issues that can prevent the VBS script from running the BAT script.
  7. To test the suggested workaround, kill the process ScanningPluginBR.exe and ensure that it restarts automatically with a new PID. Also, ensure that the PID remains the same for a time longer than the duration of a loop, which in the default case is 10 seconds.

By following these steps, an administrator can ensure that the ABBYY Scanning Plugin operates correctly and efficiently on the system, mitigating installation issues and improving scanning functionality.

 

Add an app to run automatically at startup in Windows 10 - Microsoft Support

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.