I face a problem while uninstalling Rational Rose Enterprise Package.
The Rational folder is not deleted.I used many sripts but all those scripts worked well outside the package when i insert this in the wise package the folder is not deleted.Can anyone solve this problem?Plz help me out with this.
Tell me if any custom action and in which sequence the script should be placed.
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")

Also remember to set a condition on the custom action to "Installed" as you wouldnt want it to run when you install the application.

I would try setting this before InstallFinalise in the Execute sequance.

Answered 07/17/2007 by: Inabus
Second Degree Green Belt

Please log in to comment
You may also want to look into the RemoveFile table so you don't have to mess with a script.

Answered 07/17/2007 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
Hi Paul,
Thanks for your reply.I tried your solution and aogilmor's solution but both the solutions did not wirk well inside the MSI.
Can you suggest any other solutions.In this one file inside one of the sub folder is deleted if we restart the system.
Answered 07/22/2007 by: abcd123
Yellow Belt

Please log in to comment
Hi abc,
you need to be a lot more specific, if really you want to get help.
Please post your script and the calling Custom Action.

How did you implement the solution with the RemoveFile table as Owen suggested?
That should work, but to make id rock solid, you have to recourse the folders from the deepest level and
create a line for each folder with a wildcard "*", which has the slightest possibility to contain leftovers after uninstall.
If a folder is not created by a main Installer action (directory or create folder table), you have to remove it also explicitly.
Hope, this gives yo some hints.
Regards, Nick
Answered 07/23/2007 by: nheim
Tenth Degree Black Belt

Please log in to comment
Does the account running the MSI have appropriate rights to delete the folder? Does the folder have any attribute(s) set, like read-only or hidden?
Answered 07/24/2007 by: VBScab
Red Belt

Please log in to comment
Hi Nick
I used the following script to delete the folder
target = "C:\Program Files\Rational"
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(target) Then
fso.DeleteFolder (target) (True)
End If
This script deleted some .dat files inside one sub folder and one dll file was there in another subfolder but that dll also got deleted when i rebooted the system.
After rebooting also all the subfolders remain.In this one subfolder contains another empty subfolder.
The sequence was Normal Execute Immediate\Deferred and i placed before InstallFinalize with the condition REMOVE="ALL".

In the RemoveFile table in the filekey column i gave "key1" and in the component column i gave one component related tho this application in the filename column i left it blank and in the Directory column i gave the Dir path from the directory table.

Could you just tell me little briefly how to delete the folder if it is not created in CreateFolder.

I got the MSI of the package and i created the MST.
Answered 07/25/2007 by: abcd123
Yellow Belt

Please log in to comment
abcd123, aka abrindadevi (on the Altiris forum)

No, this script did NOT. It cannot be selective about which files it deletes. It will delete a folder and its sub-folders, period.

In a response to your post on the Altiris forum, I detailed the steps you need to follow to have Wise delete a folder. However, for the benefit of others, this is from WPS's help:
1. In Setup Editor, on the Components or Features tab, right-click a component or feature and select 'New > Remove File'

The "Remove File Details" dialog appears.

2. Complete the dialog:

- Directory

Specify the directory on the destination computer where the file is located or create a new subdirectory. To create a new subdirectory, select a directory and click 'New Folder'

- File Name

Specify the name of the file to be removed. You can use wildcards to select multiple files or you can check the 'All Files' check-box to select all files in the selected directory.

- Remove During

Specify when the file should be removed: during install, uninstall, or both install and uninstall.

3. Click OK.

The operation to remove a file from the destination computer appears, preceded by a red 'X'.

As EdT on that forum reminded us, if you use this method, you need to start at the bottom of the folder tree and do ALL the folders above individually.
Answered 07/26/2007 by: VBScab
Red Belt

Please log in to comment