Error -2147024156 When Running My LabVIEW OPC Code

Updated Feb 21, 2023

Reported In

Software

  • LabVIEW Datalogging and Supervisory Control Module
  • LabVIEW 2022 Q3 Full

Issue Details

I received the following error when trying to run my LabVIEW code:

Error -2147024156 occured at getopcserverlist.vi

Possible reason(s):

The requested operation requires elevation

 
Knowledge Base article.png



 

Solution

This issue could be because LabVIEW need to the run as administrator.

Righ-cllick on the LabVIEW.exe file located on C:\Program Files (x86)\National Instruments\LabVIEW 2021 
and click on 'Run as administrator'

For a long-term solution, you can right-click on the LabVIEW.exe, go to Properties, then Compatibility, and mark the checkbox 'Run this program as an administrator'
Screenshot_4.png