gpt4 book ai didi

windows - 使用批处理文件注册dll和ocx文件

转载 作者:可可西里 更新时间:2023-11-01 13:51:12 27 4
gpt4 key购买 nike

我在 c 盘的文件夹中有 dll 和 ocx 文件,我想通过单击批处理文件来注册

最佳答案

根据 this Microsoft knowledge base article :

Regsvr32.exe usage

RegSvr32.exe has the following command-line options:
Regsvr32 [/u] [/n] [/i[:cmdline]] dllname

/u - Unregister server
/i - Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall
/n - do not call DllRegisterServer; this option must be used with /i
/s – Silent; display no message boxes (added with Windows XP and Windows Vista)

When you use Regsvr32.exe, it attempts to load the component and call its DLLSelfRegister function. If this attempt is successful, Regsvr32.exe displays a dialog box that indicates success. If the attempt is unsuccessful, Regsvr32.exe returns an error message. This may include a Win32 error code.


因此,生成的批处理文件将是:

echo off 
Regsvr32 /s C:\MyDLL.dll
exit

关于windows - 使用批处理文件注册dll和ocx文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5726678/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com