1

Friends How to Set This Code VS.NET Setup Conditions.

<Copy Condition="!Exists($(DestPath)database.dat)"
      SourceFiles="$(SrcPath)database.dat"
      DestinationFolder="$(DestPath)"/>

Source Link

Community
  • 1
  • 1
david
  • 753
  • 4
  • 14
  • 26

1 Answers1

2

You can try this approach:

  • go to Launch Conditions Editor in your setup project
  • create a new file search and configure it to find your file
  • remember the installer property used by this search
  • go to File System Editor
  • select your file
  • in its Properties pane set Condition field to the search property negated; for example, if the search property is named MY_FILE_SEARCH, the condition can be:

    NOT MY_FILE_SEARCH

This way the file is installed only if the search doesn't find anything.

Cosmin
  • 21,216
  • 5
  • 45
  • 60