PDA

View Full Version : Primer files question



raconteur
05-04-2009, 04:04 PM
I need to install an updated MFC runtime environment on target systems running XP SP2 or later. It appears that the recommended way of doing that is with a primer file.

I've investigated and discounted several other options (download links, "side-by-side" implementations in the product, and dependency modules), for various reasons.

The help files are a bit confusing on the topic of primer files. There are caveats about using File.Run on Vista systems, and also caveats about using Shell.Execute when the installer needs to wait for return or reap the reboot-required status of an executed file (both are required in this case).

What is the best way to go about this in 7.x?

Thank you very much in advance for any advice you can offer.

btw, I have detected and enforced the OS, version and service pack level, and permissions things.

jassing
05-07-2009, 01:07 AM
I minimize the use of primer files, and avoid using "dependency modules"

instead, install the to %TempFolder% --- set it to not uninstall.
In PostInstall run the mfc installer; then delete it.

SetupJuggler
05-07-2009, 04:13 AM
Hi all,
using SUF 8.1.1006.0

we use "dependency modules", it's a simple way to install a required prerequisites. In SUF 8 there is a dependency module for the VC2008 avail, for checking if install is necessary and if so, starting the install. You have to make some fixes within the module, but it's a good template. Dependency module supports no localisation for messages, that's bad.


I minimize the use of primer files, and avoid using "dependency modules"

instead, install the to %TempFolder% --- set it to not uninstall.
In PostInstall run the mfc installer; then delete it.

Hi jassing,
why do you avoid using "dependency modules", what's to bad with this for not using? With our previous InstallShield installer I did it in a similar way.
I have to install them before my setup copies any file, because some of the files need to be registrated while installing. If not having the MFC I got an error, during register.

Udo

jassing
05-07-2009, 09:28 AM
The problem, as i see it, with primer files and how SUF handles them is:
Once you launch your installer, it installs "stuff" w/o your ok.

So let's say you download a trial app that you think might do something you need. You get to the license and decide "nah, I'll skip this application". You cancel -- sorry; we've already installed some crap on you system that you didn't actually need.

I handle all that stuff (runtime files, etc) by installing them to the %TempFolder% or %TempLaunchFolder% and running them in "Post Install" that way if the user decides not to install before we install any files; there is no "foot print" left behind.

raconteur
05-07-2009, 11:59 AM
Thank you very much for your help, folks.

I wouldn't mind upgrading to SUF 8, and using a dependency module, if one existed for that particular environment (afaik, an updated one hasn't been created yet).

I'll try installing to a temp folder and launching that way, thanks again.

jassing
05-07-2009, 12:08 PM
Udo:
Sorry I missed this bit:


I have to install them before my setup copies any file, because some of the files need to be registrated while installing. If not having the MFC I got an error, during register.


The easy way is to not use the "installers automatic registration" and register the files "manually".

Another thing -- the mfc files -- I haven't read the eula; but I believe that's one of the few bits from MS you can repackage when redistributing. You could also just install the requied mfc files with a lower install-order; then let the auto-registration do it's thing.

raconteur
05-08-2009, 01:13 PM
Yes, those MFC dlls are redistributable with no strings attached (at least as far as the legal stuff goes) but the real gotcha is in the installation and registration... there are a bunch of libraries and their installation locations and registration details vary widely depending on OS, version, and service pack level, as whomever created the earlier MFC dependency package can probably tell you... the redist installer from MS is pretty big (relatively) and makes a gazillion registry entries that I don't want to try to manage.

SetupJuggler
05-13-2009, 08:18 AM
raconteur,

you're right there a re a lot of things to think about if doing the MFC distribution by your own. To handle this, MS delivers vc_redistx86.exe. This handles the target directory, e.g. <Windir>/WinSxS, and all of the registrations. So I think the use of SUF dependency is correct, but SUF should not do this directly after the start of the installer. If you install vc_redistx86 not in silent mode you got a licence agreement for your user and if not aggreed, your setup stops.

jassing,

I did this suggestion http://www.indigorose.com/forums/showthread.php?t=26946. What do you think about?



The easy way is to not use the "installers automatic registration" and register the files "manually".

But now we have those fine possibilities and I only have to code the dependency module. If the vc_redistx86 changes, may be for the next service pack, I only have to change this file. That's it. SUF should support other install stages for those dependencies.