我有大约5-10 DLL中的100个将在构建期间注册和未注册后,整个构建是完成,所有DLL都在一个文件夹中。对于注册,我写了一个post构建事件,但是现在要取消注册--这100个中的5-10个DLL似乎没有任何概念,我对批处理脚本很陌生,所以很早就会感到困惑。我搜索了一些地方,但都显示了如何在文件夹中注册/取消注册所有文件-不指定DLL -将预构建事件写入注销注册表-在用于生成解决方案的重新生成选项中似乎不起作用。
发布于 2017-12-09 05:51:44
下面是一种使用包含*.dll名称到Register Unregister的文本文件的方法
@echo off
::For /f will look for *.dll names in files.txt
::Than Do register/unregister *.dll as specified in regsvr32
::
for /f %%i in (files.txt) do regsvr32 /u /s C:\Windows\System32\%%i
exitFor /?寻求帮助
用法
FOR /F %variable IN (file-set) DO command [command-parameters]
RegSvr32 命令使用
Usage: regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname
/u - Unregister server
/s - Silent; display no message boxes
/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 /ihttps://stackoverflow.com/questions/47707533
复制相似问题