Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Win7 註冊 OCX 元件出現錯誤 0x80040200?以系統管理員身分執行 regsvr32 解決

編輯:Windows 7 系統介紹

錯誤原因

在 Win7 中直接雙擊或以一般權限執行 regsvr32 xxx.ocx 註冊元件時,因權限不足導致錯誤 0x80040200。

正確操作流程

  1. 點擊「開始」,搜尋框輸入 CMD,右鍵搜尋結果選擇「以系統管理員身分執行」。
  2. 在命令提示字元視窗中,輸入:
    regsvr32 路徑\檔案名.ocx
    例如:regsvr32 D:\MyLib\common.ocx
  3. 按 Enter 執行,出現「DllRegisterServer 成功」訊息即代表註冊完成。
以系統管理員身分執行 CMD 執行 regsvr32 指令

補充說明

  • 若為 64 位元系統註冊 32 位元 OCX,請使用 %windir%\SysWOW64\regsvr32.exe。
  • 反註冊指令為 regsvr32 /u 檔案名.ocx。
  • 此方法同樣適用於 DLL、AX 等 ActiveX 元件。
Copyright © Windows教程網 All Rights Reserved