We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

joell
Posts: 1
Joined: Wed Oct 09, 2013 7:45 pm

How Can I Rename an exe based on the name of the MSI

I need to rename one of the exe files in the install to the name of the msi. The msi will dynamicaly change for each user who downloads it. Is this possible?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How Can I Rename an exe based on the name of the MSI

Hi and welcome to Advanced Installer forums.

The name of a file that is added in the Files and Folders page is of PseudoFormatted type, so it can be modified only before or during the build time, it cannot be modified at install time.

However, you can achieve this if you follow the steps below:
- use the [OriginalDatabase] property to get the name of the MSI package (this property contains the full path to the MSI, so you can create a custom action to parse it)
- create a custom action which will rename the .exe file after it was installed on the user's machine and place it after "Install Execution Stage -> Add Resources" action group
- check the "deferred" with "no impersonation" option for this custom action

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”