Setup doesn't copy files if the same files exist

B

Boaz Ben-Porat

Hi all
I guess it is not the right group for this problem, but I can't find a
Newsgroup about Setup projects.

Visual studio 2005 SP1

My Setup project (.vdproj) is very simple. The project's output (msi
package) contain one EXE and three DLLs (created in C#) that should be
copied to an existing folder, where an older version already exist. The
installer should replace these files with the new ones.

The existing files are NOT write-protected.

If I run the Setup when the old files exist in the target folder, they are
NOT replaced. If the old files are removed, the new ones are installed
properly.

Any solution?

TIA

Boaz Ben-Porat
Milestone System
Denmark
 
J

John Vottero

Boaz Ben-Porat said:
Hi all
I guess it is not the right group for this problem, but I can't find a
Newsgroup about Setup projects.

Visual studio 2005 SP1

My Setup project (.vdproj) is very simple. The project's output (msi
package) contain one EXE and three DLLs (created in C#) that should be
copied to an existing folder, where an older version already exist. The
installer should replace these files with the new ones.

The existing files are NOT write-protected.

If I run the Setup when the old files exist in the target folder, they are
NOT replaced. If the old files are removed, the new ones are installed
properly.

Any solution?

MSI uses file versioning to determine if it needs to copy a file. If the
existing file has a version that is equal to or greater than than the file
in the MSI, the file is NOT copied.
 
B

Boaz Ben-Porat

Hi John.

I can't see my last reply to this mail, so I swnd it again.

Is there any way to force overwriting regardless of file version (some
switch or property in the installer) ?

TIA

Boaz Ben-Porat
 
L

Larry Smith

I can't see my last reply to this mail, so I swnd it again.
Is there any way to force overwriting regardless of file version (some
switch or property in the installer) ?

I once did a lot of MSI work and although my memory of the subject has grown
fuzzy, I strongly recommend against this. There are a lot of carefully
crafted rules surrounding MSI versioning and it's not a good idea to play
around with them. It's complicated business with trap doors you don't want
to fall into. You should read up on the subject and version your files
accordingly. Let MSI take care of updating your files according to the usual
rules of file replacement.
 
J

John Vottero

Boaz Ben-Porat said:
Hi John.

I can't see my last reply to this mail, so I swnd it again.

Is there any way to force overwriting regardless of file version (some
switch or property in the installer) ?

No, not that I know of.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top