批处理文件(bat文件)注册dll

来源:互联网 发布:mac圣诞限量套装2017 编辑:程序博客网 时间:2024/04/29 21:30

1)注册

Regist.bat

@echo 开始注册
net stop iisadmin /y
@echo 跳转到当前批处理文件路径
cd %~dp0
copy DynamicGif.dll %windir%\system32
regsvr32 %windir%\system32\DynamicGif.dll /s

copy ImageOle.dll %windir%\system32
regsvr32 %windir%\system32\ImageOle.dll /s
net start w3svc
@echo 注册成功
@pause

2)重新注册

ReRegist.bat

@echo 重新注册
net stop iisadmin /y
@echo 跳转到当前批处理文件路径
cd %~dp0
regsvr32/u %windir%\system32\DynamicGif.dll /s
del %windir%\system32\DynamicGif.dll
copy DynamicGif.dll %windir%\system32
regsvr32 %windir%\system32\DynamicGif.dll /s

regsvr32/u %windir%\system32\ImageOle.dll /s
del %windir%\system32\ImageOle.dll
copy ImageOle.dll %windir%\system32
regsvr32 %windir%\system32\ImageOle.dll /s
net start w3svc
@echo 重新注册成功
@pause

3)反注册

UnRegist.bat

@echo 删除注册
net stop iisadmin /y
@echo 跳转到当前批处理文件路径
cd %~dp0
regsvr32/u %windir%\system32\DynamicGif.dll /s
del %windir%\system32\DynamicGif.dll
regsvr32/u %windir%\system32\ImageOle.dll /s
del %windir%\system32\ImageOle.dll
net start w3svc
@echo 删除注册成功
@pause

原创粉丝点击