PDA

View Full Version : Cleaning Up Obsolete Files (Components) & Directories



Superfreak3
09-06-2018, 12:00 PM
Hi there,

Soon I will be undertaking some work on our Web application installation template, which is going to require a good bit of obsolete component removal. Along with removing the components I would like to remove obsolete Directory table records/entries as well.

Typically what I do to remove or cleanup something like the following...

\ObsoleteDirectory
Component1.exe
Component2.dll
Component3.dll
\ObsoleteSubDirectory
Subcomponent1.exe
Subcomponent2.dll

... is, starting at the lowest folder, to delete the Components from the components view, taking note of the directory assignment. Then, I use Direct Editor to remove the ObsoleteSubDirectory from the Directory table. I think I may even do a search to ensure the directory is not used elsewhere in the template/package. Then I work up removing the main folders components, directory record, etc.

It hasn't been a huge deal or much work doing it this way and usually only happens maybe once or twice a year. Now, however, the stuff that has to be removed has many components in many, many, many, many, many (you get the idea) sub-folders.

I know one of the options is to remove unused folders per release at build time, but I am wondering if there is any automated way to remove unused directories from the actual .ism or if it continues to be a manual process. I just don't like to keep old 'stuff' in there which clutters things up in my mind.

Any help appreciated.

Superfreak3
09-12-2018, 10:18 AM
Here's what I did that seemed to save a lot of time.

In Components view, I deleted all the components that fell under the directory structure I was trying to get rid of. I then sorted Directory table entries by the column showing the full path, multi-selected, and deleted the records corresponding to the directory structure to be purged.

Compiled and tested and all seemed good.

Previously I would work from the bottom of the directory tree up, deleting contained components then the folder from the directory table. Again, this was OK for small batches of deletions and directory cleanup, but this current task had a deeper directory tree and components.

Hope this helps someone in the same boat!

DanGalender
09-16-2018, 12:49 PM
Also, if you're going to deploy this updated installer to a machine that has the older installation on it, it will need to be deployed as a major upgrade since you'll be removing components from the MSI.

Superfreak3
09-16-2018, 04:48 PM
Yes, it will definitely be a Major Upgrade so no worries there.

Jenifer
09-18-2018, 01:06 AM
Here's what I did that seemed to save a lot of time.

In Components view, I deleted all the components that fell under the directory structure I was trying to get rid of. I then sorted Directory table entries by the column showing the full path, multi-selected, and deleted the records corresponding to the directory structure to be purged.

Compiled and tested and all seemed good.

Previously I would work from the bottom of the directory tree up, deleting contained components then the folder from the directory table. Again, this was OK for small batches of deletions and directory cleanup, but this current task had a deeper directory tree and components.

Hope this helps someone in the same boat!

Hi,

Instead trying manual deletion from components view,you can try out for Add File/Folder removal which you could see under Files and Folders view(on right click context menu)which indirectly adds entry to RemoveFile table.If you want to delete explicitly you can add entries to RemoveFile table manually

Please refer this link for more information:http://helpnet.installshield.com/installshield21helplib/helplibrary/RemoveFileTableSprt.htm
You can ignore this if you had already tried this,

Thanks,
Jenifer

Superfreak3
09-18-2018, 06:56 AM
Hi,

Instead trying manual deletion from components view,you can try out for Add File/Folder removal which you could see under Files and Folders view(on right click context menu)which indirectly adds entry to RemoveFile table.If you want to delete explicitly you can add entries to RemoveFile table manually

Please refer this link for more information:http://helpnet.installshield.com/installshield21helplib/helplibrary/RemoveFileTableSprt.htm
You can ignore this if you had already tried this,

Thanks,
Jenifer

The suggestion you offered is for install package runtime behavior, no? I am talking about the .ism build template. I want to keep that fairly clean and not have directory table entries which are no longer used hanging around in the template. I know there is an option to not include empty directories in the .msi, but they still exist in the template. Having that clutter remaining in the template could cause issues when troubleshooting install issues, etc.

My changes, again, refer to the .ism, before the .msi is compiled and run, which is when the tables you mentioned would be used/acted upon.