Check whether certutil is in PATH

This commit is contained in:
Yukino Song
2025-02-15 04:10:23 +08:00
parent e35f9fac60
commit 6489c554a2
@@ -1,12 +1,14 @@
@echo off @echo off
pushd %~dp0 pushd %~dp0
set "CERTUTIL=certutil"
where certutil >nul 2>&1 || set "CERTUTIL=%SystemRoot%\System32\certutil.exe"
echo ================ echo ================
echo Installing cert for the SudoVDA driver... echo Installing cert for the SudoVDA driver...
certutil -addstore -f root "code_signing.crt" %CERTUTIL% -addstore -f root "code_signing.crt"
certutil -addstore -f TrustedPublisher "code_signing.crt" %CERTUTIL% -addstore -f TrustedPublisher "code_signing.crt"
echo ================ echo ================
echo Removing the old driver... It's OK to show an error if you're installing the driver for the first time. echo Removing the old driver... It's OK to show an error if you're installing the driver for the first time.