Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Installing third party app


2 replies to this topic

spdygnlz

spdygnlz
  • Full Members
  • 106 posts

Posted 10 December 2007 - 22:21

I'm installing a third party app that's only supposed to be installed with our program. The installer is not an msi, so there's no problem running it during our installs. The problem is that it tries to access a file that we install so it can install correctly. (it registers a file and our file is a dependency.) Anyway, I added a Custom action at the very end of the installation that launches their installer. (right before Install Finalize) When their installer tries to access our file, it fails saying it can't find it. If I open explorer at this point, I can see that the file exists. If I run their installer again immediately after our installer finishes, it works just fine.

Is there something that needs to finalize the filecopy action that runs in install finalize so that other programs can access it?

I've been thinking about using XCopy to copy the file it's looking for out of the supportdir or something so it's not in the file table. Can anyone think of any other way to work around this?

Edited by spdygnlz, 11 December 2007 - 20:34.


-- spdygnlz --

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 12 December 2007 - 15:23

You need to make your custom action "deferred" (and typically also "in system context" = NoImpersonate), or you need to move it after InstallFinalize. See also Installation Phases and In-Script Execution Options for Custom Actions in Windows Installer

spdygnlz

spdygnlz
  • Full Members
  • 106 posts

Posted 12 December 2007 - 17:49

It is a deferred action already. Thanks for the link. I've read it many times before, but never really caught that the CA needs to be Immediate if it's after InstallFinalize.

QUOTE
# Deferred, rollback and commit custom actions can only be placed between InstallInitialize and InstallFinalize. Not following this rule will result in error 2762: "Cannot write script record. Transaction not started."

I'll try setting it to Immediate and run after InstallFinalize. I'll let you know how it goes. Thanks!

-- spdygnlz --