cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hai12345
Level 3

Delete all folders which is newly created by user

Hi,
I am new to Installanywhere.
Is there any way to delete the folder/files, which is created after installation?

Thanks in advance.
Labels (1)
0 Kudos

(9) Replies
jerome_IA
Level 9

The installer cannot know what is not done by itself, so you can't.

If those files/folders are created under the installation directory, you can still add command in the uninstallation phase that will recursively delete everything.

Also in folders creation (install phase), there is a checkbox "Recursively delete..." that you may check.

--Jerome
0 Kudos
hai12345
Level 3

hi jerome_IA,

thanks.

where i can get "Recursively delete". it is under Install or pre- install in UI.
please can you specify it.
0 Kudos
jerome_IA
Level 9

hai12345 wrote:
hi jerome_IA,

thanks.

where i can get "Recursively delete". it is under Install or pre- install in UI.
please can you specify it.


In the install phase, in the create folder action, there are 4 checkboxes, one is the recursive delete.

--Jerome
0 Kudos
hai12345
Level 3

thanks,

yes. i can able to delete new folder like uninstall, other folder.

How i can delete home directory itself, even user add any new files/folder.
0 Kudos
jerome_IA
Level 9

hai12345 wrote:
thanks,

yes. i can able to delete new folder like uninstall, other folder.

How i can delete home directory itself, even user add any new files/folder.


You will have to create custom script or run custom code action that will delete those files/folders. e.g.

--Jerome
0 Kudos
hai12345
Level 3

Hi Jerome,

Thanks.

I have added "rm -rf $USER_INSTALL_DIR$" command in Post-Uninstall. It is deleting all files/folders.

Is it will affect any other functionality?

--
Mahendran
0 Kudos
jerome_IA
Level 9

hai12345 wrote:
Hi Jerome,

Thanks.

I have added "rm -rf $USER_INSTALL_DIR$" command in Post-Uninstall. It is deleting all files/folders.

Is it will affect any other functionality?

--
Mahendran


Not until $USER_INSTALL_DIR$ is equal to "/" 😉
0 Kudos
hai12345
Level 3

Hi,
I have one more doubt, I have tested this in windows.

is same command will works for all platform? if not what change i have to do?
0 Kudos
jerome_IA
Level 9

hai12345 wrote:
Hi,
I have one more doubt, I have tested this in windows.

is same command will works for all platform? if not what change i have to do?


Of course it cannot work, each platform should have its specific command.
InstallAnywhere will execute the command exactly like you entered it!

Use platform rule in you action so that linux commands are not executed on windows & vice et versa.
0 Kudos