Make a exe for both windows 7 and windows 10(python script)

Take a look at the following topic

Py2exe and psycopg, build on Windows 10, can't run on Windows 7

Add this to the options dict in setup.py:

dll_excludes': ['Secur32.dll', 'SHFOLDER.dll', 'CRYPT32.dll']