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

Renaming a file


5 replies to this topic

Chelley

Chelley
  • Members
  • 43 posts

Posted 24 May 2005 - 11:28

Hi

I want to be able to rename a file when its installed without using any script. Is this possible?

Michelle



mandy

mandy
  • Members
  • 121 posts

Posted 24 May 2005 - 12:12

I'm assuming that you can't hardcode the name in your package, and wish to make it variable using a property?

Otherwise you could simply give it the correct name in the first place. wink.gif

What is going to determine the name of the file?

Edited by mandy, 24 May 2005 - 12:13.


Chelley

Chelley
  • Members
  • 43 posts

Posted 24 May 2005 - 14:54

Basically we have several different customers and the original name of the file will have the customer initials in the filename. However, the software looks for a specific generic name so dependant on which customer installs the software depends which file they get.

ie. ABC.dll, DEF.dll and GHI.dll needs to be installed as OASIS.dll dependant on wherther customer ABC, DEF or GHI installs the file.

Michelle

mandy

mandy
  • Members
  • 121 posts

Posted 24 May 2005 - 15:14

Hello Michelle,

I believe there is a better method to solve this issue.

1) Create three components - one per customer. All three components should by targeted at the some folder.

2) Put each customer's file in their respective component.

3) Conditionalise each component so that only the correct one will be installed.

In all three cases, the destination filename is "oasis.dll".


Chelley

Chelley
  • Members
  • 43 posts

Posted 24 May 2005 - 15:56

So where do I set the Destination file name???

Michelle

mandy

mandy
  • Members
  • 121 posts

Posted 24 May 2005 - 17:01

In the "FileName" column of the file table.

Simply add them to your project with different names, then ensure they are separated into three different components. Finally, change the "FileName" column to make them all the same ("Oasis.dll" or whatever).

Obviously, without using a condition on each component, you'll end up with three components all trying to install their own version of "Oasis.dll" - which is not desireable!