Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
24 ratings:
 3.79 out of 5   

Why Does regsvr32.exe Register My .ocx File from the Incorrect Directory?

Primary Software:
Primary Software Version: 7.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem: I have two .ocx files with the same filename. One is located in the <windows>\system32 directory and the other is located elsewhere.

When I try to register the second .ocx file using regsvr32.exe, the first .ocx file gets registered instead. What can I do? 

Solution: The application regsvr32.exe is located in the <windows>\system32 directory. Consequently, typing the command regsvr32 filename.ocx will actually register the file from the local directory (in this case, <windows>\system32).

To register the desired .ocx file, specify the full (absolute) path to the file. For example, you can try the following:

regsvr32 "C:\Test Folder\test.ocx"

This will register the .ocx file in the correct directory without overwriting the first .ocx file.

Related Links:
KnowledgeBase 417EP44G: How Do I Use an OCX File in LabVIEW?
KnowledgeBase 1HBAMMSR:  How Do I Register Type Libraries, ActiveX Controls, and ActiveX Servers?


Report Date: 05/14/2003
Last Updated: 07/08/2012
Document ID: 2XDAB1SJ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit