@echo off 
 
::获取权限
echo %PROCESSOR_ARCHITECTURE%
if "%PROCESSOR_ARCHITECTURE%"=="x86" (
goto :st2
) else (
goto :st1
)
:st1
::%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
if exist "%SystemRoot%\SysWOW64" path %path%;%windir%\SysNative;%SystemRoot%\SysWOW64;%~dp0
bcdedit >nul
if '%errorlevel%' NEQ '0' (goto UACPrompt) else (goto UACAdmin)
:UACPrompt
%1 start "" mshta vbscript:createobject("shell.application").shellexecute("""%~0""","::",,"runas",1)(window.close)&exit
::exit /B
goto :st2
:UACAdmin
cd /d "%~dp0"
echo 当前运行路径是：%CD%
echo 已获取管理员权限
::pause
:st2
cd /d "%~dp0"

:: %~dp0 is the directory containing this bat script and ends with a backslash.

:: start "%cd%\" JITComVCTK_S.exe /s
sc create JITPorcessDaemonService binpath= "\"%~dp0JITProcessDaemon64.exe\"" displayname= "JITPorcessDaemonService" depend= Tcpip start= auto
sc description JITPorcessDaemonService "VCTK_S核心服务，终止或禁用该服务会造成不能完成服务功能。"
sc start JITPorcessDaemonService
