cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Tim_Mayert
Level 9

Custom Action call with Binary Table entry Question

Okay here is one that I have not seen before, at least I have not found any question like it, but maybe some has tried this.

I have a file that I do not want to install on the system, but needs to be referenced during a custom action call. I would like to place the file in the Binary table, but wonder how I would call it.

Here is what my custom action does, it will use the Directory Table [SystemFolder] to call Rundll32.exe with the following command line:
[SystemFolder]Rundll32.exe "[INSTALLDIR]VistaLib32.dll",RunNonElevated "[INSTALLDIR]InstallManager.exe"

Now this works okay, but then I have to install the file Vistalib32.dll and I would like to avoid that. So I was wonder if I can place the Vistalib32.dll into the Binary Table and if so then how could I then reference the file within this command line?

If anyone has attempted this and got it to work then could you give me some pointer?

Thanks,
Labels (1)
0 Kudos
(5) Replies
RobertDickau
Flexera Alumni

Unless you're directly launching an EXE or calling a DLL from the Binary table, I don't think it happens automatically; I gather you'll need to call something like the InstallScript StreamFileFromBinary function.
0 Kudos
Not applicable

Have you considered using the Support Files view? You could put it in there and use that as a method to launch your application.

Since you're passing in explicit paths, the only way you'd realistically have an issue is if the file had a dependency that couldn't be resolved to something in INSTALLDIR.

If that's the case then you're in a bit of a bind as far as easy to use solutions are concerned.
0 Kudos
Tim_Mayert
Level 9

Byran, I did try the [SUPPORTDIR] method, but when I run and it hits this custom action it will state that it can not find the file. Now I think this is because this custom action is called at the end of the install, from the Finish dialog, and it is set to not wait for a return as it is just launching the app at the end of the install. Since it is the end of the install the support directory is being cleaned up and therefore the file is removed and can not be found.

Thanks anyways.
0 Kudos
Not applicable

Well, if you're launching the app at the end of the installation and not waiting, I would have at least some concern that you have access to the MSI package at that point, so I'm not sure that the Binary table is a suitable place to store the file without substantial testing since you would have to stream it out manually.
0 Kudos
rasky74
Level 6

Maybe add a do action after your CA that runs a script that deletes the file (after your CA executes and returns).
0 Kudos