Echo off
Echo._______________________________________________________________
Echo.
Echo.          感谢使用 MicroDraw 图形控件
Echo.
Echo.              正在解除控件注册.
Echo.________________________________________________________________
Echo.
Echo.   http://www.microdraw.cn
Echo.   email: support@microdraw.com
Echo.________________________________________________________________

Rem ----------如果是32位GOTO 到 X32 去处理
if /i "%PROCESSOR_IDENTIFIER:~0,3%" == "X86" goto X32

%~d0
cd %~dp0

cd microdraw
Rem 如果不想弹出注册成功对话框需要加 /s 选项
Echo.解除注册64位控件...
cd x64
path = %~dp0\microdraw\x64;%PATH%
%systemroot%\system32\regsvr32 microdrawocx.ocx /u

Echo.解除注册32位控件...
cd ..
path = %~dp0\microdraw;%PATH%
%systemroot%\syswow64\regsvr32 microdrawocx.ocx /u
exit

Rem ------仅处理32位下-------------------
:X32
cd microdraw
path = %~dp0\microdraw;%PATH%
regsvr32 microdrawocx.ocx /u