narramadan
Posts: 15
Joined: Thu Jul 24, 2008 2:59 pm

Remove the installed directory completly on Uninstall

Hi,

I created the installer to install the application in the "WIndowsVolume", and also provided option for the user to select his installation folder.

If I dont change the installtion folder, and choose the default WindowsVolume for installing the application, modify some files and uninstall it, The whole installed folder and the files that were changed after installtion are removed.

But if I change the installation folder, install the app, modify some files and uninstall it, the files I changed are not removed and still remain in the choosed installation folder.

I used the following script and associated with "RemoveFolders" Custom Actions with Execution Condition expression as (Remove="ALL")

Code: Select all

Function removeFolders()
custActData = Session.Property("CustomActionData")
foldersArray = Split(custActData, "|", -1)
Set objFS = CreateObject("Scripting.FileSystemObject")

For Each folder In foldersArray
smallPath = RemoveTrailingBackslash(folder)
If (objFS.FolderExists(smallPath)) Then
objFS.DeleteFolder smallPath, true
End if
Next
End Function

Function RemoveTrailingBackslash(folderPath)
If Right(folderPath, 1) = "\" Then
RemoveTrailingBackslash = Left(folderPath, Len(folderPath) - 1)
Else
RemoveTrailingBackslash = folderPath
End If
End Function 
Can you please let us know, how to remove the installed application along with the files changes when installed in a custom installation folder..

Am using Advanced Installer v6.9.1

Madan N
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Remove the installed directory completly on Uninstall

Hello,

Advanced Installer 7.0 introduced a new feature called Uninstall Cleanup. This feature enables removal of residual resources generated by the installed product. Nonetheless, your installer is most likely to suffer from a bug that was fixed since v6.9.1. In any case, an upgrade is recommended.

You can check our Version History to see all additions to Advanced Installer brought since v6.9.1.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
narramadan
Posts: 15
Joined: Thu Jul 24, 2008 2:59 pm

Re: Remove the installed directory completly on Uninstall

Hi,

I downloaded 7.2.1 to evaluate the uninstall cleanup.

I removed the VB Script for cleaning up the installed folder during uninstall and used the uninstall cleanup wizard to remove the installed folder.

I tested the same way as explained in my earlier post.

When installed in the Default location [WindowsVolume], modify some files and uninstall, the clean up is working great. But when I install in a custom location, modify some files and choose to uninstall, the clean up is not performed. All files in the installed folder are deleted except the modified files.

The Clean up process didnt happen with the new version when installed in a custom location.

Attached the project AIP file for your reference.

Please look into this and explain how to fully remove the installed folder with out leaving any modified files or folders on uninstall.

Thanks,
Madan N
Attachments
TRX_SOFTWARE_BUSINESS_MANAGEMENT.aip
(398.14 KiB) Downloaded 650 times
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Remove the installed directory completly on Uninstall

Hello Madan,

I am not sure why you are encountering this behavior. Can you post an uninstall log so we can further investigate the issue?

Thank you,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
narramadan
Posts: 15
Joined: Thu Jul 24, 2008 2:59 pm

Re: Remove the installed directory completly on Uninstall

Hi

Attached is the requested uninstall log file.

Madan N
Attachments
uninstall.log
(9.65 KiB) Downloaded 492 times
narramadan
Posts: 15
Joined: Thu Jul 24, 2008 2:59 pm

Re: Remove the installed directory completly on Uninstall

Ignore the previous post.

Attached are the requested log file that is generated when uninstalling (The application is installed in the custom folder.)

The log file is above 1MB, so divided the file into two files..
Attachments
uninstall_log_installed_in_custom_folder_part_2.log
(343.82 KiB) Downloaded 431 times
uninstall_log_installed_in_custom_folder.log
(717.44 KiB) Downloaded 728 times
Last edited by narramadan on Thu Nov 05, 2009 3:33 pm, edited 1 time in total.
narramadan
Posts: 15
Joined: Thu Jul 24, 2008 2:59 pm

Re: Remove the installed directory completly on Uninstall

For your reference..

Attached are the requested log file that is generated when uninstalling (The application is installed in the Default folder.)

The log file is above 1MB, so divided the file into two files..
Attachments
uninstall_log_installed_in_default_folder_part_2.log
(255.79 KiB) Downloaded 712 times
uninstall_log_installed_in_default_folder.log
(846.17 KiB) Downloaded 545 times
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Remove the installed directory completly on Uninstall

Hello,

I am sorry but it appears we will also need the install logs. The problem seems to be a little more complex.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
narramadan
Posts: 15
Joined: Thu Jul 24, 2008 2:59 pm

Re: Remove the installed directory completly on Uninstall

Hi ,

Not a probs..

Attached are the requested Install log files, when installed into the custom folder.

File generated is over 3MB, so divided into 3 files.

Madan N
Attachments
3.log
(568.43 KiB) Downloaded 432 times
2.log
(816.47 KiB) Downloaded 467 times
1.log
(908.32 KiB) Downloaded 594 times
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Remove the installed directory completly on Uninstall

Hello,

We may have found a solution for this. On the Files and Folders page, right click the "TRXSoftware" folder, select Properties from the context menu, and check the "Create folder on target machine". This should fix the issue.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”