I'm trying to make a uninstaller tool and I'm having issues with the end of the code
This works but only deletes the .exe not the cwd
subprocess.Popen(f"WAITFOR /T 2 PAUSE 2>NUL & DEL \"{argv[0]}\" /f", shell=True, creationflags=0x00000008)
This deletes everything in the directory but not the directory itself
subprocess.Popen(f"WAITFOR /T 2 PAUSE 2>NUL & RD /Q /S \"{os.getcwd()}\"", shell=True, creationflags=0x00000008)
This works:
Thanks! https://stackoverflow.com/users/1362735/heretolearn