cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Superfreak3
Level 11

*** Remove [newfolder1] if empty ***..Where did this come from and what does it mean?

Hi all,

I noticed in one of my components that there is a *** Remove [newfolder1] if empty *** record in the Files view of the component. I'm guessing this is connected in some way to shortcuts. I'm using 2015 and I didn't see records of this nature while using version 2013.

Any info appreciated!
Labels (1)
0 Kudos
(6) Replies
hidenori
Level 17

The built-in support that makes it easy to specify files and folders that you want to be removed from target systems has been added to InstallShield 2014. Prior to the release, the only way to indicate which files and folders should be removed was to use the Direct Editor view to manually author entries in the RemoveFile table. Now you can manage them using the Files and Folders view, the Setup Design view, or the Components view.
0 Kudos
Superfreak3
Level 11

So it does this automatically? Like I said, I think it is for shortcut folders, but I think I saw a reference in there to a directory, newfolder5, for example that I do not believe exists. It may be residue from a previous action. Is the cleanup of that fairly solid or could there be some things left there that shouldn't be.

When I say "shouldn't be", maybe that is wrong as the install seems to work OK and uninstall doesn't seem to leave anything behind.

The newfolder# references seem to be housed in the directory table (shortcut folders) so I'll check the RemoveFile table to see that all entries are valid. I hope I don't break anything :eek:
0 Kudos
Superfreak3
Level 11

Superfreak3 wrote:
So it does this automatically? Like I said, I think it is for shortcut folders, but I think I saw a reference in there to a directory, newfolder5, for example that I do not believe exists. It may be residue from a previous action. Is the cleanup of that fairly solid or could there be some things left there that shouldn't be.

When I say "shouldn't be", maybe that is wrong as the install seems to work OK and uninstall doesn't seem to leave anything behind.

The newfolder# references seem to be housed in the directory table (shortcut folders) so I'll check the RemoveFile table to see that all entries are valid. I hope I don't break anything :eek:


So I've gone through The RemoveFile table and attached the contents sorted by DirProperty and what I think could be stripped out if there is, in fact duplication.

I don't see anything in there for the Desktop and Startup shortcut removal.

How can I tell if everything in the RemoveFile table is valid at this point?



I can't really tell what is what or which shortcuts from the Shortcuts table are referenced here.
0 Kudos
hidenori
Level 17

InstallShield automatically creates a RemoveFile entry for a shortcut that you add to a custom folder so that the folder will be removed if it is empty after the shortcut is uninstalled. We do not create RemoveFile entries for the predefined folders such as Desktop and Startup as they should not be removed from target systems. This behavior has not been changed.
0 Kudos
Superfreak3
Level 11

hidenori wrote:
InstallShield automatically creates a RemoveFile entry for a shortcut that you add to a custom folder so that the folder will be removed if it is empty after the shortcut is uninstalled. We do not create RemoveFile entries for the predefined folders such as Desktop and Startup as they should not be removed from target systems. This behavior has not been changed.


Thanks for the reply!!! It appears that something weird is going on.

In one of my .msi's I have a shortcut table containing 5 shortcuts, one of which is for Desktop and one for Startup. So, the remove file table should have 3 entries in it, correct? Also, the shortcuts are all tied to the same component (Feature) so we can regulate what shortcuts are placed based on Release Flags. I'll call that component MyComponent.

When I look in the RemoveFile table, there are 9 entries where I would think there should only be 3. I believe I might know what is happening to some extent. The components listed in the RemoveFile table are really the targets of the shortcuts. When creating the short cut, you have to point to the actual target. This appears to be when the RemoveFile entries are written. However, to regulate the shortcuts per release as described above, I switched the Component from the target to MyComponent. It does not appear that the RemoveFile table is adjusted at this time.

So, I'm thinking I could adjust the RemoveFile table with MyComponent.

Also, I believe that the shortcuts for both release configurations are making it to the final build for each release. Still, that should only leave 6 shortcuts not tied to predefined folders (3 shortcuts in custom folders in each relesase).

So, is it possible to tie the RemoveFile entries to MyComponent, again inclusion of which is based on Release Flags. And after doing so and compiling the release, will I only end up with RemoveFile entries from the particular release being built or will I still end up with all?

I'm not sure how to associated what RemoveFile records go to which shortcuts so I can clean this up a bit.
0 Kudos
Superfreak3
Level 11

It does not appear that changing the RemoveFile table component entry to MyComponent limits the file .msi table entries by the inclusion of that feature in the release.

In other words, RemoveFile table appear to get all the entries for all shortcuts regardless of what's included in the release. The shortcuts for both releases are included in the RemoveFile table in each release's .msi.

That is OK and seems to work with those entries being tied to the initial target of the shortcut when added to the project. So I'll let that part of it go.

I would like to figure out if there are any extraneous entries in there that can be cleaned out.
0 Kudos