cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Balaji_Vinu
Level 5

Change Application Name and name of the .exe

Hi Folks,
I am using Basic MSI project (IS 2009)
I have to pass the application Name during through command line argument.

How can i make it work?

Next i have to change the exe file name to same as the application name that i am going to pass through command line.

Please help me in getting in correct.
Labels (1)
0 Kudos
(1) Reply
mberterm
Level 7

Please see the help topics "Setup.exe and Update.exe Command-Line Parameters" and "MsiExec.exe Command-Line Parameters".

A string can be passed like so:
C:\> Setup.exe /V"MYPROPERTY=\"HelloWorld.exe\""
C:\> msiexec /i \myinstallation.msi MYPROPERTY="HelloWorld.exe"

The new name, HelloWorld.exe, is placed into the property MYPROPERTY.

A custom action can take the name from the property and change the file name once it is on the file system (ie. late in the installation process).

Watch out for auto-repair issues: since most EXEs are marked as the key file of their respective components, simply renaming the file will cause the MSI engine to not find it and trigger the auto-repair to replace it. Perhaps make a renamed copy of the file.
0 Kudos