PDA

View Full Version : How do I ensure a file is named exactly a certain value at install time?



lmodern1878
10-03-2020, 12:20 AM
Hello:

I'm needing to know how do I make sure that I file is named a certain name at install time?

Here's what I've done so far:
1. On the "Files and Folders" visualizer I've placed my original file in the "always install" feature in it's correct path for installation (for example, let's say it is named "MyApp_Patched.exe" on my development PC.)
2. I've opened up the properties of the file and in the "Advanced" tab under "Destination Filename (optionally)" I've entered what it should be called on the customer PC (let's say "MyApp.exe")
3. Selected that file in various places throughout my script and wind up with "%_SB_INSTALLDIR%\MyApp_patched.exe" after selecting it using the "folder" button (example when creating a shortcut in the start menu I click the folder icon to select it).

My question is with that setting being set in point 2 above, do I need to manually remove the "_patched" suffix or is the installer smart enough to put the correct file name on all instances where "%_SB_INSTALLDIR%\MyApp_patched.exe" might have been accidentally left in place?