/build/static/layout/Breadcrumb_cap_w.png

how to delete installation directory after uninstallation?

dear folks,
we have been maintaing multiple products .they were installll into installdir is c:\program files\<company name><product name>.whenever uninstalled all products from the system its not deleting all folders i.e. installdir (Ex: c:\program files\<company name>).and also i have wrote some custom actions but those r not working properly ..........so now my question is how to delete all install folders and files along with sub folders also ? [sm=rolleyes.gif][sm=rolleyes.gif][sm=rolleyes.gif]

0 Comments   [ + ] Show comments

Answers (14)

Posted by: AngelD 15 years ago
Red Belt
0
For the MSI to remove a directory all directoryies including sub-folders must be empty.
Could it be possible that the user is local admin and the application itself produces some files/folders which is not included in the MSI?

What have you tried as for the custom action?
Posted by: mehappy 15 years ago
Orange Belt
0
Create a Batch file that contains: remdir "c:\program files\[applicationsfolder]" /s /q. So create an Custom Action and run your batch file after the uninstall is finished. This will remove the folder and subfolders you wish to remove.
Posted by: jmcfadyen 15 years ago
5th Degree Black Belt
0
i would be very careful using a script to do this.

your initial comments state you have multiple products in the same path. this means that your reference count scenario would be completely disregarded so a script would most likely blanket delete your product and any others in the same location.
Posted by: mehappy 15 years ago
Orange Belt
0
You are right John, if we have several applications from same manufacturer like Adobe. All products from Adobe will usually be installed under C:\Program Files\Adobe\. If we use REMDIR "C:\Program Files\Adobe /s /q, it will permanently delete Adobe directory and every subdirectories and files. I use REMDIR when I want to remove an specific folder that wont be automatically remove during uninstall process.
Posted by: axsysbabu 15 years ago
Orange Belt
0
Dear Happy,
this will remove empty folders only. doesnt remove sub folders......
Posted by: axsysbabu 15 years ago
Orange Belt
0
simply we have written script i.e . using launchappandwait we made custom actions
Posted by: spartacus 15 years ago
Black Belt
0
ORIGINAL: axsysbabu

Dear Happy,
this will remove empty folders only. doesnt remove sub folders......



[font="courier new"]C:\> rmdir /?
[font="courier new"]RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path
[font="courier new"] /S Removes all directories and files in the specified directory
in addition to the directory itself. Used to remove a directory
tree.
[font="courier new"]
Looks good enough to get the job done to me, even if the folders aren't empty and there are subfolders ...

Regards,

Spartacus
Posted by: AngelD 15 years ago
Red Belt
0
So if you have uninstalled all products that writes folders/files to the "c:\program files\<company name><product name>" then the files/folders that are left are they included in any of the (uninstalled) packages?

Check that there is no component with the msidbComponentAttributesPermanent attribute bit set on them as that will prevent the components resources from being removed during uninstall.
Posted by: anonymous_9363 15 years ago
Red Belt
0
You're aware, of course, that - natively (i.e. without adding explicit entries in the RemoveFile table or by adding Custom Actions) - an MSI will only remove files which it installed. So, if the application writes data to a file or files in any of the folders, those files will NOT be removed by uninstallation.
Posted by: MSIPackager 15 years ago
3rd Degree Black Belt
0
Try ProcMon
Posted by: AngelD 15 years ago
Red Belt
0
hehe nice, but ProcMon will not help this time.

The log file will tell for each component that is not removed during uninstall.
I would start with that. I guess it would be easier to find the component(s) for file(s) that is not removed and search for them in the verbose log.
Posted by: simoncummings 15 years ago
Senior Yellow Belt
0
lol!!
Posted by: jmcfadyen 15 years ago
5th Degree Black Belt
0
debugview ? I know this fellow Kim who wrote a cool article on its use.
Posted by: AngelD 15 years ago
Red Belt
0
hehe nice call,

I mostly use DebugView to investigate if ex. InstallShield script based MSI queries/modifies the database.
Otherwise the output from DebugView and a verbose log (+x) would produce the same result (except the database query).
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ