Search code examples
wixuninstallationpyinstallerhidden-files

Delete files from hidden folder during uninstall (WiX, Pyinstaller)


I would like to delete file (that was created by pyinstaller in C:\Users\User\AppData\Local\VirtualStore\Program Files (x86)\App\tmp ) during Uninstall (using WiX). Any idea on how to do that?

Does anybody know why pyinstaller creates that file and if I can control that?


Solution

  • A partial answer: That virtual store location is where Windows redirects file output when the program is not privileged enough to write to a location, and does not have an elevation-type manifest that shows it is UAC-aware. This might help:

    http://sourcedaddy.com/windows-7/uac-virtualization.html

    So it appears that pyinstaller assumes it is being run as administrator, but it isn't, and is writing to a location that's virtualised. Instead of trying to remove those files I'd look at that installer and how you are running it and (since it seems to require admin privilege) how to have it run with admin privilege. I assume it's old technology because an updated version would presumably include an elevation manifest saying that it requires admin privilege.