Reputation: 63
I'm building setup in install4j but some files I unziped in installation directory and some files in data directory not uninstall.
For examle: C:\Program Files\MyApp - it's directory where set up my app and in this directory I install postgresql (unzip from zip file) C:\Program Files\MyApp\postgresql C:\MyData\Myapp - data directory (f.e. data of PostgreSQL need install not in system directory)
For save path of my app I create windows registery and put value there.
I tried removing the MyApp in two ways:
1) In 'Run script' action I get path of my data from register (File dataDir = new File(pathToDataDir)) and later try uninstall by dataDir.delete() and also try run script 'rmdir "pathToDataDir'. This option does not work due of permissions.
2) In this way I try to register path of my register in install4j by two methods (context.installDirectory and context.registerUninstallFile()) and later install4j (in my opinion) should be install my directories. In file /.install4j/files.log I find my directories, but install4j not uninstalled directories.
What problem can there be in this case?
Sorry for my English =)
Upvotes: 1
Views: 911
Reputation: 48105
You can use a "Install content of a ZIP file" action to extract the ZIP file in such a way that the extracted files will be removed by the installer.
Alternatively, a "Delete files and directories" action in the uninstaller will remove selected files or directories.
Upvotes: 1