I created a CA called SetDir. This CA is called to change one of my destination directory. (It is called after CostFinalize in InstallExecuteSequence) The folder is created successfully on install, but the problem comes on Uninstall. The uninstall won't delete the folder that is created by SetDir.
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Uninstall doesn't delete folders...
Started by
ClydeMontreal
, Jun 12 2003 22:18
4 replies to this topic
Posted 12 June 2003 - 22:23
The method I use to create an empty folder that is associated with a component is to put an entry in the CreateFolders table. This folder gets removed on uninstall automatically as long as it's still empty.
G-Man
G-Man
Posted 13 June 2003 - 08:42
Windows Installer will only remove folder that it has knowledge of and this is why external folders created in custom actions do not get removed.
You can either create a dummy folder (like Geoffrey has said) or create another custom action to clean up these folders.
You can either create a dummy folder (like Geoffrey has said) or create another custom action to clean up these folders.
Posted 10 July 2003 - 06:41
U can use this vb script to remove folders and files created at run time aswell...
Dim fso,sPath
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemobject")
sPath = Trim(session.property("INSTALLDIR"))
sPath = Left(sPath,Len(sPath)-1)
If fso.FolderExists(sPath) Then
FSO.deleteFolder sPath, True
End If
Set fso = Nothing
Cheers
Sunil
Dim fso,sPath
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemobject")
sPath = Trim(session.property("INSTALLDIR"))
sPath = Left(sPath,Len(sPath)-1)
If fso.FolderExists(sPath) Then
FSO.deleteFolder sPath, True
End If
Set fso = Nothing
Cheers
Sunil
Posted 11 July 2003 - 06:05
Example: Removedir=c:\program files\ToBeRemoved
Dim fso,sPath
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemobject")
sPath = Trim(session.property("Removedir"))
sPath = Left(sPath,Len(sPath)-1)
If fso.FolderExists(sPath) Then
FSO.deleteFolder sPath, True
End If
Set fso = Nothing
Cheers
Sunil Jain
Dim fso,sPath
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemobject")
sPath = Trim(session.property("Removedir"))
sPath = Left(sPath,Len(sPath)-1)
If fso.FolderExists(sPath) Then
FSO.deleteFolder sPath, True
End If
Set fso = Nothing
Cheers
Sunil Jain