cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mdavies
Level 3

Desperately need setup.exe filename - Basic MSI

My installer:
- Basic MSI wrapped in a setup.exe that has been renamed.

The goal:
- During runtime, copy the *.exe to a cache location.

The problems:
- I have no idea what the *.exe filename is since the user could have changed it.
- DISK1SETUPEXENAME is NULL even though it is supposed to work. Arg!

What won't work:
- Hard coding the *.exe file name anywhere in the project.
- Having the user pass the filename in as a property.

Questions:
- Does there exist any InstallScript variables or Windows Installer properties that contain the setup.exe filename or path including filename?
- Is there any other way (preferably not with complied code) to get the name/path of the *.exe?
- Is there a way to cache the *.exe to another directory without doing a file copy that has to know the source filename?
Labels (1)
0 Kudos
(1) Reply
mdavies
Level 3

Never found a real solution so here is my workaround.

Find all *.exe files in SETUPEXEDIR. For each file call a third party executable that prints the embedded version/property information. Write that information to a file. Search that file for the current product name. If the product name is found then copy that file to the cache directory. If product name is not found then go to the next file.

This method may break if there are two or more exe files in the SETUPEXEDIR that have the same product name as the current product.
0 Kudos