Skip to content

Instantly share code, notes, and snippets.

View coffandro's full-sized avatar

Cornelius Andreas Rosenaa coffandro

View GitHub Profile
@PaulCreusy
PaulCreusy / SelfSignWindowsExecutable.md
Last active August 29, 2024 07:00
How to self-sign a Windows executable created with Pyinstaller

How to self-sign a Windows package created with Pyinstaller

This document aims to explain all the necessary steps to self-sign a Windows executable.

⚠️ Warning
Some of the commands provided need to be completed. The fields to complete are indicated by the characters < and >.

Prerequisites

Please make sure to match all the prerequisite before starting the process of signing the package.

import subprocess
def execute(command):
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
output = ''
# Poll process for new output until finished
for line in iter(process.stdout.readline, ""):
print line,
output += line