@echo off
title HTTPAnalyzerFullV7 绿色破解版 - 绿化程序
color 80

rem 测试管理员权限
set TempFile_Name=%SystemRoot%\System32\BatTestUACin_SysRt%Random%.batemp
( echo "BAT Test UAC in Temp" >%TempFile_Name% ) 1>nul 2>nul
if exist %TempFile_Name% (
goto Install
) else (
echo.
echo 请以管理权限运行当前批处理！
echo.
)
Rem type %TempFile_Name%
del %TempFile_Name% 1>nul 2>nul
pause
exit


:Install
%~d0
cd "%~dp0"

echo 注册SSL证书
set ssl=%SystemDrive%\ProgramData\IEInspector\HTTPAnalyzerV7\SSL
md %ssl%
copy /y SSL\*.* %ssl%
CertMgr.Exe /add /all /c "%ssl%\HttpAnalyzer CA.cer"  /s /r localmachine root

echo 注册组件和IE插件
%SystemDrive%\Windows\System32\regsvr32.exe /s IEHTTPAnalyzerV7.dll
%SystemDrive%\Windows\System32\regsvr32.exe /s IEInspectorBHO.dll

echo 注册服务和驱动
copy /y haStdnetfilter.sys %SystemDrive%\Windows\System32\drivers\
nfregdrv.exe haStdnetfilter
FixPathDataType.exe
netFilterService.exe /Install /Silent
HttpAnalyzerStdV7.exe /regserver

echo 注册程序
regedit /s setting.reg

start CreatLnk.vbs

echo 安装完成！
pause
start HttpAnalyzerStdV7.exe