From 6489c554a26778f9e0848911dd355b2211fcfc1c Mon Sep 17 00:00:00 2001 From: Yukino Song Date: Sat, 15 Feb 2025 04:10:23 +0800 Subject: [PATCH] Check whether certutil is in PATH --- src_assets/windows/drivers/sudovda/install.bat | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src_assets/windows/drivers/sudovda/install.bat b/src_assets/windows/drivers/sudovda/install.bat index a7c6a702..3f633594 100644 --- a/src_assets/windows/drivers/sudovda/install.bat +++ b/src_assets/windows/drivers/sudovda/install.bat @@ -1,12 +1,14 @@ @echo off - pushd %~dp0 +set "CERTUTIL=certutil" +where certutil >nul 2>&1 || set "CERTUTIL=%SystemRoot%\System32\certutil.exe" + echo ================ echo Installing cert for the SudoVDA driver... -certutil -addstore -f root "code_signing.crt" -certutil -addstore -f TrustedPublisher "code_signing.crt" +%CERTUTIL% -addstore -f root "code_signing.crt" +%CERTUTIL% -addstore -f TrustedPublisher "code_signing.crt" echo ================ echo Removing the old driver... It's OK to show an error if you're installing the driver for the first time. @@ -22,4 +24,4 @@ nefconc.exe --install-driver --inf-path "SudoVDA.inf" echo ================ echo Done! -popd +popd \ No newline at end of file