View Full Version : Major Upgrade, OnFirstUIAfter code not taking effect

04-04-2002, 10:10 AM
Strange goings on with Major Upgrade. I do a lot of things in InstallScript, including a couple FileCopy's and that is also where I generate most of my registry entries.

Installing my version 1.00 works fine, all registry entries and FileCopys work fine.

After I did a major upgrade (1.01 over 1.00) those FileCopys looked like they didn't happen and there were no registry entries. Everything got uninstalled from 1.00 and only those things that are configured in the GUI got reinstalled. Anything that was configured in Installscript did NOT get installed with the 1.01 Major Upgrade.

At first it looked like the code in my OnFirstUIAfter was not getting run. But then I put a couple MessageBox's in there. And during the install those MessageBox's appeared! But the code did not get executed (or matbe it did but did not take effect?)

What's going on here? If I want to use major upgrade functionality, do I have to configure my whole application using the GUI? Am I prohobited from doing anything in Installscript?

Thanks - Dave

04-05-2002, 08:48 AM
What happens when you run your upgrade script under debugger? does it execute the FirstUIAfter code ok?

04-05-2002, 09:45 AM
Yes OnFirstUIAfter runs. As a matter of fact, all the way up until right before I click "Finish", all of the files and registry entries are present and accounted for. But immediately after I click Finish they disappear.

04-05-2002, 10:13 AM
Hard to tell you what is going on but we use Major Upgrades extensively and we are pretty much script-driven only. Works like a champ all the time.

Sorry but I can't add much more than this.

04-05-2002, 01:48 PM
Check your Installation \ Execute sequence, I've heard that sometimes actions get moved around misteriously (never had this problem myself, but...). Make sure there are no 'Remove(something)' actions at the end.

04-05-2002, 04:38 PM
Well here was the problem. I need my installs to run on NT SP3 or higher, not SP6. So I was using a special hack (see KB #Q105489) to drop in the old version 1.2 Windows Installer engines. Apparently Major Updates are not supported well under these old engines.

Time to lobby my coworkers to lift this SP3 restriction!


04-05-2002, 04:49 PM
It is good to know this! We have been using the 1.2 engines in some cases because the NT workstations have SP5.

So far we didn't have trouble but if it happens in the future, it will save me the time I would spend chasing my tail...

Fortunately, we will have everybody out of NT in the next couple months.