@ECHO OFF
IF NOT EXIST "%CD%\SystemExplorer.exe" (
  CLS
  ECHO Поместите этот командный файл рядом с  SystemExplorer.exe
  ping 127.0.0.1 -n 10 > nul
  explorer "%ProgramFiles%\System Explorer"
  GOTO :EOF
)
IF NOT EXIST %WinDIR%\system32\sc.exe GOTO :Start_SystemExplorer
IF NOT EXIST %WinDIR%\system32\taskkill.exe GOTO :Start_SystemExplorer

IF %PROCESSOR_ARCHITECTURE% EQU x86 GOTO ARCH86
  ECHO x64
  IF NOT EXIST "%CD%\service\SystemExplorerService64.exe" GOTO :EOF
  START /WAIT taskkill /F /IM SystemExplorer.exe
  ping 127.0.0.1 -n 1 > nul
  sc stop SystemExplorerHelpService
  ping 127.0.0.1 -n 1 > nul
  sc delete SystemExplorerHelpService
  ping 127.0.0.1 -n 1 > nul
  sc create SystemExplorerHelpService start= demand binPath= "%CD%\service\SystemExplorerService64.exe"
  ping 127.0.0.1 -n 1 > nul
  sc start SystemExplorerHelpService
GOTO :Start_SystemExplorer

:ARCH86
  ECHO x86
  IF NOT EXIST "%CD%\service\SystemExplorerService.exe" GOTO :EOF
  START /WAIT taskkill /F /IM SystemExplorer.exe
  ping 127.0.0.1 -n 1 > nul
  sc stop SystemExplorerHelpService
  ping 127.0.0.1 -n 1 > nul
  sc delete SystemExplorerHelpService
  ping 127.0.0.1 -n 1 > nul
  sc create SystemExplorerHelpService start= demand binPath= "%CD%\service\SystemExplorerService.exe"
  ping 127.0.0.1 -n 1 > nul
  sc start SystemExplorerHelpService
GOTO :Start_SystemExplorer

:Start_SystemExplorer
START SystemExplorer.exe