@echo off

echo 正在卸载iWebOffice2009控件...
regsvr32.exe /u "%~dp0x86\iWebOffice2009.ocx" /s
del /F /S /Q c:\windows\system32\iWebOffice2009.ocx
regsvr32.exe /u "%~dp0x64\iWebOffice2009.ocx" /s
del /F /S /Q C:\Windows\SysWOW64\iWebOffice2009.ocx

echo 正在卸载iWebOffice2015控件...
regsvr32.exe /u "%~dp0x86\iWebOffice2015.ocx" /s
del /F /S /Q c:\windows\system32\iWebOffice2015.ocx
regsvr32.exe /u "%~dp0x64\iWebOffice2015.ocx" /s
del /F /S /Q C:\Windows\SysWOW64\iWebOffice2015.ocx

echo 正在安装iWebOffice2015控件...

msiexec /package "%~dp0\iWebOffice2015.msi"

copy /y "%~dp0x86\iWebOffice2015.ocx" c:\Windows\system32\iWebOffice2015.ocx
copy /y "%~dp0x64\iWebOffice2015.ocx" c:\Windows\SysWOW64\iWebOffice2015.ocx
copy /y "%~dp0x86\SignX64.ocx" c:\windows\system32\SignX64.ocx
copy /y "%~dp0x64\webprint.dll" c:\Windows\SysWOW64\webprint.dll
copy /y "%~dp0x64\FTCOM.dll" c:\Windows\SysWOW64\FTCOM.dll

echo 正在注册iWebOffice2015控件...

regsvr32.exe  c:\windows\system32\SignX64.ocx  /s 
regsvr32.exe  c:\Windows\SysWOW64\webprint.dll  /s 
regsvr32.exe  c:\Windows\SysWOW64\FTCOM.dll  /s 

regsvr32.exe "%~dp0X86\iWebOffice2015.ocx"   /s
regsvr32.exe "%~dp0X64\iWebOffice2015.ocx"   /s

regsvr32.exe "%~dp0X86\npiwebplugin.dll"  /s 
regsvr32.exe "%~dp0X64\npiwebplugin.dll"  /s 
regsvr32.exe "%~dp0X86\StockVBAs.dll"  /s 
regsvr32.exe "%~dp0X64\StockVBAs.dll"  /s 
regsvr32.exe "%~dp0X86\FuncExtModule.dll"  /s
regsvr32.exe "%~dp0X64\FuncExtModule.dll"  /s


echo 正在注册iWebRevision控件...

msiexec /package "%~dp0\iWebRevisionII\iWebRevisionII.msi"
