Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Uninstallation does not remove some of the file and defaul directory 2

Status
Not open for further replies.

jyotinw

Technical User
May 6, 2003
1
US
Hello
I have created the package which after uninstallation does not clean all the files .Also the Default directory does not get deleted.
Please help

Thanks & Regards
Jyoti
 
Several things to look at:

1) If there are entries in the CreateFolder table there also needs to be a corresponding entry in the RemoveFolder table.
2) If the program, when running, creates extra files or adds ini settings these won't be deleted.
3) If the program is running or has a service that isn't stopped upon uninstall, the uninstall mechanism won't be able to remove the files.
4) You could have some component errors. In Wise for Windows Installer search for any red components
5) You may want to try logging the uninstall:
Code:
msiexec.exe /X "full path to .msi" /L*V c:\uninstall.log
. Look at the log file for the word "Error"
6) Sometimes you simply have to create a custom action to delete unwanted folders. Following is an example of a VBScript CA than can be embedded in the installation (of course WScript must be installed on the PC for it to work)

Code:
Dim oFSO: Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.DeleteFolder Session.Property("ProgramFilesFolder") & "Folder Name", True  'Session.Property is Wise for Windows Installer specific.
Set oFSO = Nothing

The reason I used ProgramFilesFolder rather than INSTALLDIR (these variables are for Wise for Windows Installer) is because WfWI always includes a trailing "\" on folder names. This would keep the DeleteFolder method from working. You could also parse out the "\".

HtH,

Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top