PDA

View Full Version : Install file with different name



tonisa
11-10-2010, 02:35 AM
Hi,
is it possible to install a file changing its name on the destination folder, for example the files
c:\myapp1\myexe.exe -> %_SB_INSTALLDIR%\App1.exe
c:\myapp2\myexe.exe -> %_SB_INSTALLDIR%\App2.exe
best regards
Toni

linder
11-10-2010, 03:39 AM
Hi Toni,

No, this is not possible. What you can do is the following (a #rename compiler directive before you add the file):

#rename file "c:\myapp1\myexe.exe" to "c:\myapp1\App1.exe"
Install File "c:\myapp1\App1.exe" to "%_SB_INSTALLDIR%\App1.exe" (Always Install)
#rename file "c:\myapp2\myexe.exe" to "c:\myapp2\App2.exe"
Install File "c:\myapp2\App2.exe" to "%_SB_INSTALLDIR%\App2.exe" (Always Install)

Friedrich

tonisa
11-10-2010, 04:30 AM
Hi Friedrich,
thanks for your prompt response. Your tipp should work. Could be, in future versions you will include such a feature (DestinationFileName).
best regards.
Toni

Chris
06-21-2012, 09:40 AM
A bit late, but I would also like this feature. eg Install MyFile.exe to %folder%\NewMyFile.exe

It is because I have a system setup whereby new versions are compiled to a distribution folder, and then the several SetUp Programs use that single source file and rename it as they install it for different purposes. Obviously I can work around this now by creating copies of the source file and renaming them each time before compiling the Setups.