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

File Availability


3 replies to this topic

spdygnlz

spdygnlz
  • Full Members
  • 106 posts

Posted 14 March 2008 - 23:04

I've been plagued by this one for a long time.

When I run my install, I have over 1500 - 2000 files that I place on the target machine. I have certain things that I need to do with those files, so I create deferred Custom Actions that run sometime after the InstallFiles action. The problem is that it seems that sometimes I can access the files I need and sometimes not.

Here's a couple examples.

1. I have a third party installer (it's not an MSI) that requires a file that I install to be on the system for it to run correctly. I made sure that I created a deferred custom action right before InstalFinalize that launches this third party installer, but it complains that it can't find that one particular file. We actually called them and had them remove the requirement in their install condition thinking that would fix it, but to no avail. When it reached the point where it actually needed that file (to create an instance of a class), again it couldn't be found and that install failed. I ended up adding that third party installer to the RunOnceEx key and letting it get installed after a reboot. Not pretty, IMHO.

2. We have a few .NET .dll files that we need to register with some special command line params, in a specific order. I created a new table to hold the information, a fancy script to write a .bat file that calls regasm and redirects output to a .log file, and a deferred Custom Action to execute the .bat file right before the InstallFinalize action. The bat file runs and the .log files are created. The strange thing was that of the 2 files that needed to be registered, 1 was able to be found by the .bat file and registered correctly and one was not. Again, I'm back to putting the .bat file in the RunOnce key.

Why can I not access some of the files during my install? I've placed MessageBoxes to pause the installs right before the CustomAction so I can manually check to see if the file is there and sure enough it is. Is there a switch I need to set? Is there something funny with the way the processes work that only the launching process can access the files until the MSI is done? I know I can't run Custom Actions after the InstallFinalize. I'd like to not have to use the RunOnce key. I'm pulling my hair out trying to figure this out. Any clues? Thanks.

-- spdygnlz --

phood

phood
  • Full Members
  • 37 posts

Posted 17 March 2008 - 20:20

Check the variables you are using to find the file. Chances are, your custom code is using [INSTALLDIR] from the CustomActionData variable, but it is not populated.

Just a thought.

spdygnlz

spdygnlz
  • Full Members
  • 106 posts

Posted 18 March 2008 - 16:21

Thanks. That's bitten me before, but that's not what it is this time. I have a very detailed log file and I've quadruple checked that the files are where I think they are and that all vars are what I think they should be.

-- spdygnlz --

spdygnlz

spdygnlz
  • Full Members
  • 106 posts

Posted 19 March 2008 - 23:54

I just ran across the InstallExecute action which is supposed to execute the script up until that point. Would it help if I ran this action after my InstallFiles action?

-- spdygnlz --