@echo off
:: 生成证书文件
certutil -generateSSTFromWU roots.sst
if %errorlevel% neq 0 (
    echo Failed to generate SST file.
    pause
    exit /b %errorlevel%
)

:: 将证书添加到系统根存储
certutil -addstore -f root roots.sst
if %errorlevel% neq 0 (
    echo Failed to add certificate to root store.
    pause
    exit /b %errorlevel%
)

:: 删除生成的证书文件（可选）
del /f /q roots.sst

exit
