Announcement

Collapse
No announcement yet.

Rename file during install

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rename file during install

    Can I rename a file while installing it? The "destination / install to" is a folder so don't think I can specify a new name there.

    Currently I've renamed the file after it is installed, but that makes the uninstall skip it. I guess I could try naming it back as a pre-step in the uninstall.

    What is the proper way to handle something like this?

    Thanks!

    Greg

  • #2
    One possible approach is as you describe, renaming the file after install and again before uninstall; another method could be setting the "Never remove" option for the file, rename it after install as you already mentioned, and then add the renamed file to the uninstaller with UninstallData.AddItem() manually. Perhaps there is also a way where you could include the file in the installer using the desired name, so no renaming would be required.

    Ulrich

    Comment


    • #3
      Ulrich,

      Thank you for the clarification and the additional options. I like the "UninstallData.AddItem()" option. I assume I could do it right after the rename, which would then allow the rename and uninstall code to be together, which is more manageable from a code standpoint.

      Thanks again.

      Greg

      Comment

      Working...
      X