Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Installing along user-modified files


4 replies to this topic

Jarkko

Jarkko
  • Members
  • 2 posts

Posted 02 March 2006 - 18:25

Hello.

I have a installscript/msi-project. Here's something that it does:

File F is installed on the users machine.

User modifies file F.

Now, suppose that he gets a new version of our program. It contains new version of file F.

We don't want file F to be overwritten. During installation we want to check
if file F on the target machine has been modified, and if it has, we want to rename the new F as F.New and install it to the same directory.


It seems I need to write some code to do this.

But if anyone knows if there is some easier way out, either by
installscript or msi tweaks, let me know.

thanks
Jarkko

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 02 March 2006 - 19:07

This is the default behaviour of Windows Installer for non-versioned files. So you shouldn't have to do anything special.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 02 March 2006 - 19:08

What I said is true for Small and Minor updated. Things get more complicated for Major Upgrades (ProductCode changed).

Jarkko

Jarkko
  • Members
  • 2 posts

Posted 03 March 2006 - 17:16

Stefan, thanks for replying.

If that's the default behaviour, I must be doing something wrong.

Whenever the installer encounters a modified file on the target machine, it leaves it
alone, noting down that "Won't Overwrite; Won't patch; Existing file is unversioned but modified"

But it doesn't install the new file either.

Interestingly, when I look at the difference between the two msi:s, I note

Table MsiFileHash, added record MyFile.txt1.
Table MsiFileHash, deleted record MyFile.txt.

I'm don't know about MsiFileHash table... could it be that this MyFile.txt1 is the one
I want installed along the user-modified MyFile? huh.gif

have a nice weekend
Jarkko

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 06 March 2006 - 16:40

I'm sorry, looks like I only read the first half of your original post. The default behaviour is that user modified files won't be overwritten. Nothing else will happen out of the box. If you want to install the new file under a different name you probably will need a custom action, or a copy of the component with the .new file name.