Will signing a PyInstaller app stop Windows from blocking it?

November 24, 2026 5 answers
Asked by _quo.61+

My PyInstaller app is unsigned. Downloads get SmartScreen warnings, and Smart App Control sometimes blocks bundled DLLs or Python extension files at startup.

Would signing the main executable be enough, or do the bundled files need signatures too? Does onefile versus onedir make a difference?

Answers

Dazvori-6k

Don't assume the signature on the launcher covers every file Windows loads. Smart App Control can evaluate individual binaries, so an unsigned DLL or .pyd may still be blocked even when the main executable is signed.

For an onedir build, inspect the signatures on the files in the distribution, sign the unsigned binaries you ship, and then sign the main executable and installer if you have one. Test the finished package on a machine with Smart App Control enabled. A signature improves your chances, but it is not a guarantee that every component will pass.

FlickerMason+4u:

Check existing signatures first. Some third-party DLLs may already be signed by their publishers, so there is no reason to automatically replace those signatures.

Reply to this answer
4q~brackencrank_731

SmartScreen and Smart App Control aren't the same check. Signing can help establish publisher identity, but don't buy a certificate expecting SmartScreen warnings to vanish immediately. The executable and publisher may still be evaluated for reputation and other signals.

Smart App Control can allow an app signed with a certificate from a trusted certificate authority when its app intelligence service can't make a prediction. That still isn't a promise that signing will override every block.

Reply to this answer
6u.Rexi-

I'd start with onedir for troubleshooting. You can see the DLLs and extension modules in the output and check which file is being blocked. Onefile extracts files at runtime, which adds another thing to investigate, but it doesn't mean you can't sign the contained binaries and the outer executable.

Reply to this answer
2j~canvasratchet_784

Signing isn't a sure fix. Even signed software can be flagged, and an organization may have its own application control rules. Check the exact blocked file and policy on an affected machine rather than assuming every startup failure is a reputation issue.

Reply to this answer
NimbleParcel!6

If packaging remains a headache, another option is to evaluate Nuitka instead of PyInstaller and sign the resulting executable and installer. That changes the build tool, though, not the basic need to test Windows security behavior with the files you actually distribute.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions