Thomas K's answer is close, but at least, in my case, not accurate. After some trial and error, I found that the GUID should be enclosed in braces:
bdist_msi_options = { "upgrade_code": "{96a85bac-52af-4019-9e94-3afcc9e1ad0c}" }
and these parameters must be passed along with the "build_exe" parameters (some online examples use different names for these arguments, but I found that only bdist_msi works):
setup( # name, version, description, etc... options={"build_exe": build_exe_options, # defined elsewhere "bdist_msi": bdist_msi_options}, executables=[Executable("run.py", base="win32GUI", shortcutName="My Program name", shortcutDir='ProgramMenuFolder')])
With this code, in my case, the previous installers were correctly removed and removed from the list of add / remove programs.
source share