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

preserve existing file during install???


1 reply to this topic

BRY

BRY
  • Members
  • 44 posts

Posted 24 June 2002 - 12:29

Hi folks,

During my installation, I need to install a file which MAY already exist on the target machine.
If this is the case, I ALWAYS want to keep the version which exists and NOT overwrite it with the version in the install.

The file does not have a version number.

Is there any way, I can tell InstallShield to only install the file in question if it doesn't exist on the users system?


I can't find anything anywhere - would this be a flag somewhere?

Thanks,
Bryan Dickson
[br]Senior Software Engineer
[br]Fugro-UDI Limited

hteichert

hteichert
  • Members
  • 158 posts

Posted 24 June 2002 - 13:47

This isn't a really tricky one:

First, use the AppSearch table to look for the file in question, like creating an entry with property MYSPECIFICFILE (or another global name). Because you're looking for a file, you will have to use the AppSearch, DrLocator and Signature tables. Further details on AppSearch can be found in Windows installer help file, look for "Searching for Existing Applications, Files, Registry Entries or .ini File Entries".
Second, you have to put your file in a component by it's own and set the condition for this component to "Not MYSPECIFICFILE".

That's it.
h.teichert-ott