@Echo off
cd /d %~dp0
xcopy /y yjpk.dll d:\YijieSoft\
attrib +s +h d:\YijieSoft
regsvr32 /s d:\YijieSoft\yjpk.dll
if errorlevel 1 goto err
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Security" /v "Level" /t REG_DWORD /d "1" /f
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Excel\Security" /v "vbawarnings" /t REG_DWORD /d "1" /f
REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Security" /v "vbawarnings" /t REG_DWORD /d "1" /f
Echo.
Echo 注册类库成功！
goto end
:err
Echo.
Echo 注册类库失败！应以管理员身份运行！
:end
Pause>nul
