-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsign.bat
More file actions
42 lines (34 loc) · 1.12 KB
/
Copy pathsign.bat
File metadata and controls
42 lines (34 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@echo off
REM Self-sign shader.exe and shader.scr — no PowerShell
REM Requires: Windows SDK (makecert, pvk2pfx, signtool)
set EXE=shader.exe
set SCR=shader.scr
set PFX=psychip.pfx
set PASS=psychip2026
set PVK=psychip.pvk
set CER=psychip.cer
if exist %PFX% goto :sign
echo Creating self-signed certificate...
makecert -r -pe -n "CN=PsyChip,E=root@psychip.net" -ss My -sr CurrentUser -a sha256 -len 2048 -cy end -sky signature -sv %PVK% %CER%
if errorlevel 1 (
echo makecert failed. Make sure Windows SDK is in PATH.
pause
exit /b 1
)
echo Converting to PFX...
pvk2pfx -pvk %PVK% -spc %CER% -pfx %PFX% -po %PASS% -f
del %PVK% 2>nul
del %CER% 2>nul
:sign
if not exist %PFX% (
echo ERROR: No certificate found.
pause
exit /b 1
)
echo Signing %EXE%...
signtool sign /f %PFX% /p %PASS% /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /d "AVS Shader Screensaver" /du "https://www.psychip.net" %EXE%
if exist %SCR% (
echo Signing %SCR%...
signtool sign /f %PFX% /p %PASS% /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /d "AVS Shader Screensaver" /du "https://www.psychip.net" %SCR%
)
echo Done.