@Echo Off
Title EmEditor
Pushd %~dp0
Md "%WinDir%\System32\test_permissions" 2>NUL||(Echo 请使用右键管理员身份运行&&Pause >NUL&&Exit)
Rd "%WinDir%\System32\test_permissions" 2>NUL
if /i "%PROCESSOR_IDENTIFIER:~0,3%" == "X86" goto x86
if /i "%PROCESSOR_IDENTIFIER:~0,3%" NEQ "X86" goto x64
:x86
regsvr32 /u /s "%~dp0emedshl.dll"
exit
:x64
regsvr32 /u /s "%~dp0emedshl.dll"
regsvr32 /u /s "%~dp0emedshl64.dll"
exit