I'm writing a program with Python and now I'm writing the uninstall program. Not removing the uninstall program itself is uncomfortable to users. Is there a way to remove it without have the user to manually delete?
P.S. The exe is produced by PyInstaller. That doesn't really matter -- I'm writing an other exe to remove the original. Now the code is something like this:
import os
import shutil
for i in ('xxx.exe', 'xxx.txt', 'xxx.db'):
try:
os.remove(i)
except (FileNotFoundError, OSError, IOError):
pass
shutil.rmtree('xxx')