cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
BizerbaDev
Level 6

MSI Basic: Executing an EXE file that comes with the Support Files?

Hi @ all,

I know there have been several posts on this topic already but I'm under the impression noone was ever able to get it to work or maybe nobody ever posted how he did it after he found out. I've been working on this simple simple simple task for about four hours now with no success:

I have a MSI Basic setup project. In the "Support Files" tab of the project I added an exe file to the "Language Independent" AND to the "Advanced Files\Disk1" area. I now want to create a Custom Action that shall call this exe file after all files have been copied.
Looking at the Wizard for the Custom Action I have four options to launch an exe from a given location:
1. "Installed with the product"
=> This is no option for me as the exe is only a small migration tool that should only be used once.
2. "Stored in the Binary table"
=> I have no idea how to use this. I Found hardly any documentation on the binary table.
3. "Stored in the Directory table"
=> I played with this for a while. I added an entry in the Directory table that points to the support files in the Temp folder. Everything seems nice, files are there, pathes are correct and the executable can be called manually without any problem, but I still get an error -1721 when the Custom Action fires. Unfortunatel MSI is not very helpful when it comes to -1721... it could be either that the file is missing or something else. I tried changing the execution options and the execution scheduling, but nothing worked out so far. Checking the log file of the install that is created in the temp folder I always get -1721 although the given path and executable name are correct.
4. "Stored in the Property table"
=> When I hardcode the path to the exe in this option then it actually works! However I cannot hardcode the path it should be something like '[TempFolder]\{Product-GUID}\MyApp.exe' - which does not work because the variable name [TempFolder] is not translatet...

Any ideas how to get this to work?

Reagards

Ralf
Labels (1)
0 Kudos
(1) Reply
BizerbaDev
Level 6

Well, after six hours my problem seems to be fixed:

1. Create a Property table that should later on keep the full path to the exe file
2. Create a first Custom Action of type "Set a property" which will set the property of step one with something like [SourceDir]MyTool.exe.
3. Create a second Custom Action of type "Launch an executable" that will use the property from steps one and two.

In Installscript it would have been one line of code... 😞

Hope this will help someone else someday...
0 Kudos