PowerShell call for CertUtil

This commit is contained in:
Robin 2016-08-15 17:21:14 +02:00
parent 863fb6c007
commit f1e152eb38

View file

@ -55,7 +55,9 @@ Function MD5($filename) {
Function PrepareCertificate() {
$decodedContentBytes = [System.Convert]::FromBase64String($env:Certificate)
$decodedContentBytes | set-content "greenshot.pfx" -encoding byte
certutil -p "$env:CertificatePassword" -importpfx -f "greenshot.pfx" NoExport
$certutilArguments = @('-f', '-p', $env:CertificatePassword, '-importpfx', "greenshot.pfx")
Start-Process -wait -PassThru certutil -ArgumentList $certutilArguments -NoNewWindow
}
# Sign the file with Signtool before they are packed in the installer / .zip etc