Delete Folders after uninstall
When uninstalling the App my msi leaves a folder behind and i wanna know if there is any other way of deleting that folder instead of writing a Vbscript in custom actions?
0 Comments
[ + ] Show comments
Answers (11)
Please log in to answer
Posted by:
anonymous_9363
16 years ago
I suspect that this is because the application is creating files in that folder that your MSI didn't include. It should be obvious that an uninstaller won't, by default, remove objects which it didn't install. You could try creating and installing a 'dummy' file which hopefully the app would overwrite. Not all apps are happy about that, though. Alternatively, your authoring tool should have an option to remove files on uninstall. Finally, if it doesn't, you need to manipulate entries in the RemoveFiles table.
Posted by:
AngelD
16 years ago
Posted by:
Coriolus
16 years ago
Posted by:
fsubzwari
16 years ago
Posted by:
chichora2003
16 years ago
i get this error after uninstalling
ERROR 1720 : There is a problem with this windows installer package. A script is required for this install to complete could not be run. Custom action deleting folder script error , Microsoft VBScript runtime error.Path not found Line 3 , Column 1.
This is how my custom action looks like
dim filesys, folder1
set filesys = CreateObject ("Scripting.FileSystemObject")
set folder1 = filesys.GetFolder("c:\program files\APPNAME\")
folder1.Delete
Install exec seq= AfterInstallFinalize
InstallExec Cond=REMOVE="ALL"
ERROR 1720 : There is a problem with this windows installer package. A script is required for this install to complete could not be run. Custom action deleting folder script error , Microsoft VBScript runtime error.Path not found Line 3 , Column 1.
This is how my custom action looks like
dim filesys, folder1
set filesys = CreateObject ("Scripting.FileSystemObject")
set folder1 = filesys.GetFolder("c:\program files\APPNAME\")
folder1.Delete
Install exec seq= AfterInstallFinalize
InstallExec Cond=REMOVE="ALL"
Posted by:
AngelD
16 years ago
Posted by:
anonymous_9363
16 years ago
Posted by:
chichora2003
16 years ago
Posted by:
chichora2003
16 years ago
Posted by:
AngelD
16 years ago
Here is an example for the "C:\Program Files\MY PACKAGE\EMPTY" directory
Replace "{C506A086-DBD1-4936-8DA2-E9BF08F27A1E}" with your own Component GUID (ComponentId column)
Component table
Component ComponentId Directory_ Attributes Condition KeyPath
CreateFolder {C506A086-DBD1-4936-8DA2-E9BF08F27A1E} EMPTY 0
CreateFolder table
Directory_ Component_
EMPTY CreateFolder
Directory table
Directory Directory_Parent DefaultDir
INSTALLDIR ProgramFilesFolder MYPACK~1|MY PACKAGE
EMPTY INSTALLDIR EMPTY
FeatureComponents table
Feature_ Component_
Complete CreateFolder
Replace "{C506A086-DBD1-4936-8DA2-E9BF08F27A1E}" with your own Component GUID (ComponentId column)
Component table
Component ComponentId Directory_ Attributes Condition KeyPath
CreateFolder {C506A086-DBD1-4936-8DA2-E9BF08F27A1E} EMPTY 0
CreateFolder table
Directory_ Component_
EMPTY CreateFolder
Directory table
Directory Directory_Parent DefaultDir
INSTALLDIR ProgramFilesFolder MYPACK~1|MY PACKAGE
EMPTY INSTALLDIR EMPTY
FeatureComponents table
Feature_ Component_
Complete CreateFolder
Posted by:
danr29
16 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.