all groups > visual studio .net setup > april 2004 >
You're in the

visual studio .net setup

group:

Can I tell MSI to forget about a file it installs.



Can I tell MSI to forget about a file it installs. JimG
4/16/2004 2:01:02 PM
visual studio .net setup: I created a Setup project in VS.NET 2003 that installs files to a folder of another Application. My Setup would be considered "Delivering an Add-In"

One problem came up because when the Application is run for the 1st time after the "add-in" is installed, the Application detects files of a certain type and proceeds to convert them (normal operation for this Application). One of the files from my setup gets converted to another file type thereby removing it from the folder. MSI see's that the file is mssing and repairs it. The Application see's this new file and wants to convert again, and on, and on.., things get loopy in a big hurry

Is there a property I can set on this file that tells the MSI core to ignore that the file is gone and not repair it, and for that matter, forget about it altogether

O

I'm thinking a custom action might work if I write it so that the file that gets converted is renamed using another type and then included in the Setup project with this new name. The MSI delivers the file and the custom action script makes a copy of it renaming the filetype part. The MSI won't be able to track the custom action script doing this and will essentially not do anything about the converted file

Thoughts

RE: Can I tell MSI to forget about a file it installs. PatBak NO[at]SPAM online.microsoft.com
4/22/2004 11:02:26 PM
Unfortuantly I do not think there is a way to do this via the UI. The best
option is to modify the MSI using the SDK tool ORCA. It should be a simple
field change in the MSI tables. You should be able to find the MSI SDK on
MSDN or Microsoft Web Site.

Patrick Baker - Visual Basic/Deployment Quality Assurance Team
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
[quoted text, click to view]
of another Application. My Setup would be considered "Delivering an Add-In".

One problem came up because when the Application is run for the 1st time
after the "add-in" is installed, the Application detects files of a certain
type and proceeds to convert them (normal operation for this Application).
One of the files from my setup gets converted to another file type thereby
removing it from the folder. MSI see's that the file is mssing and repairs
it. The Application see's this new file and wants to convert again, and on,
and on.., things get loopy in a big hurry.

Is there a property I can set on this file that tells the MSI core to
ignore that the file is gone and not repair it, and for that matter, forget
about it altogether?

OR

I'm thinking a custom action might work if I write it so that the file that
gets converted is renamed using another type and then included in the Setup
project with this new name. The MSI delivers the file and the custom action
script makes a copy of it renaming the filetype part. The MSI won't be able
to track the custom action script doing this and will essentially not do
anything about the converted file.

Thoughts?

TIA
[quoted text, click to view]
Re: Can I tell MSI to forget about a file it installs. Michael J. Carter
5/11/2004 8:25:26 AM
I've looked in the MSI SDK, and browsed all the table definitions.

The closest thing I found is the "Files" table and the "Attributes" column.
There is a flag "msidbFileAttributesVital" but this is also available in the
VS.NET Properties Page.

Can you be more specific about which Table/Column/Value needs to be set to
specify that a file needs to be installed, but afterwards no longer needs to
be tracked?

I have an application that installs some sample configuration files. If the
user deletes these samples, the next time the application starts, it tries
to "repair" the installation and reinstall these files. This is not what I
want.

Any more detail you can provide would be greatly appreciated.

Michael


[quoted text, click to view]

Re: Can I tell MSI to forget about a file it installs. Phil Wilson
5/11/2004 3:58:42 PM
You need to figure out what's causing the repair, by which I mean if it's a
shortcut or a COM activation or something else. If use of a shortcut is
triggering the repair, you could make the shortcut itself non-advertised by
changing the Shortcut table. If you want all shortcuts to be non-advertised,
edit the Property table to set the DISABLEADVTSHORTCUTS property. This will
disable repair caused by use of shortcuts.

That vital flag has nothing to do with repair, by the way.
--
Phil Wilson [MVP Windows Installer]
----
[quoted text, click to view]

AddThis Social Bookmark Button