Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
Last active January 21, 2023 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoeGlines/5bc6c442324a3d828484267f0315ff79 to your computer and use it in GitHub Desktop.
Save JoeGlines/5bc6c442324a3d828484267f0315ff79 to your computer and use it in GitHub Desktop.
;*******************************************************
; Want a clear path for learning AHK; Take a look at our AutoHotkey courses.
; They're structured in a way to make learning AHK EASY: https://the-Automator.com/Learn
;*******************************************************
; Create certificate
$cert = New-SelfSignedCertificate -Subject "{CertName}" -CertStoreLocation "cert:\CurrentUser\My" -HashAlgorithm sha256 -type CodeSigning
; Create password
$pwd = ConvertTo-SecureString -String "{123456}" -Force -AsPlainText
; Export Certificate to a file
Export-PfxCertificate -cert $cert -FilePath {CertName}.pfx -Password $pwd
; Sign the executable
signtool.exe sign /f {CertName.pfx /fd sha256 /p 123456 {Program}.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment