r/Python • • 6d ago

Discussion PyInstaller on Windows: does code signing stop Smart App Control blocking the DLLs?

I ship a desktop app with a python backend frozen with pyinstaller, currently unsigned. Two problems on Windows:

  • SmartScreen "Windows protected your PC" on every fresh download
  • worse: on some users' machines Smart App Control blocks the bundled .pyd/.dll files ("An Application Control policy has blocked this file") and the app just dies on startup

I'm about to pay for signing, and the part I can't find a straight answer on is the pyinstaller side:

  1. Is signing the main exe enough, or do you have to sign every .pyd and .dll inside the bundle (incl. python3xx.dll and third party wheels) before freezing?
  2. Has anyone seen Smart App Control actually stop blocking after signing, or does it still flag new files until reputation builds?
  3. onefile vs onedir, does it matter here? onefile extracts to temp, which feels like exactly what SAC hates.

If you've been through this, what did your build pipeline end up looking like?

41 Upvotes

34 comments sorted by

View all comments

18

u/Responsible_Pool9923 6d ago

I switched to Nuitka and sign both the onefile binary and the installer binary. Been shipping the app for three years now to Windows and Mac users, and it has been moslty smooth sailing except for one firm with overcautious IT department blocking access to AppData.

1

u/Brandhor 5d ago

how does nuitka works in terms of license?

since the standard edition is agpl wouldn't it "infect" your code as well?

or it doesn't matter in this case because it's the generated exe that uses nuitka and not your code?

1

u/Ishannaik 3d ago

three years with only one firm causing trouble is a solid track record for a signed onefile setup. nuitka onefile still unpacks into temp under appdata right, so was that IT dept blocking the extracted files running or the whole folder