1

I have build Installshield Basic MSI project with some python files as components. On uninstallation it leaves byte compiled files behind.

I can see one of way of doing it is to write Installscript which will get called on uninstallation. Is there any elegent way of doing it?

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
Deepak Ingole
  • 14,912
  • 10
  • 47
  • 79
  • Where are these files installed? If you install to "My Documents" I would not recommend removing anything since this is considered user data. If you install underneath the Program Files hierarchy, you will need admin rights during the compile operation in order to create the files. – Stein Åsmul May 16 '14 at 13:18
  • @Glytzhkof this files gets created when I install python windows (It compiles the .py and created .pyc) service and I also write some logs into file. – Deepak Ingole May 16 '14 at 14:42
  • As already stated the MSI mechanism for this is the RemoveFile table. You specify what files should be deleted on uninstall. Be careful with wild-cards as it might delete more than it should. – Stein Åsmul May 16 '14 at 15:50

1 Answers1

1

Windows Installer only removes files it installs, and other ones it's been explicitly told about. Thus adding records to the RemoveFile table is the canonical way to do this. InstallShield 2014 adds options for this in the Files and Folders view and in the component's view, and this is available in earlier versions via the Direct Editor.

Michael Urman
  • 15,737
  • 2
  • 28
  • 44