PDA

View Full Version : -1603 Error during Major upgrade



texatexa
10-27-2003, 06:20 AM
I am trying to do a major upgrade.

After "Remove files" action during old setup uninstallation, appears "Rolling back action:" and then "Error -1603".

Into the script I use many times Disable(LOGGING) and Enable(LOGGING) to perform action that I don't want maintaining history.

New setup, as first installation, works fine.

I don't understand where is the problem (InstallScript ? or internal label of shortcuts? or ???).

When I try to debug, no point of script have problem.

Can anyone help me?
Where are critical points for Major Upgrade installation actions (next to "Removing files")?


Thank you in advance.

texatexa

alatten
10-27-2003, 07:34 AM
Critical points are OnMoved and OnEnd events of the old version. They are executed during silent uninstall of old version with all system variables set to FirstTimeInstall, especially MAINTENANCE ist set to FALSE. So if you have some script code in these events, that runs in trouble if nothing is left on the machine, and protected it with

if(!MAINTENANCE)
DangerousCode;
endif;
your silent install may crash together with your whole upgrade...

HTH,
Andrees

texatexa
10-27-2003, 08:03 AM
Thank you.
But functions you have mentioned in my script are:
- OnMoved()

function OnMoved()
begin
SdInit();
DialogSetInfo(DLG_INFO_ALTIMAGE, "", -1);
end;

- OnEnd() no implemented.

I have another function, probably critical one. I have used it on Old Setup and New setup.

****************************************
function OnInstallFilesActionBefore()
STRING i;
begin

if (!FIRST_INSTALLATION) then
Disable(LOGGING);

if (XCopyFile (INSTALLDIR ^ "dir\\BackupINI" ^"*.ini", INSTALLDIR ^ "Dir" ^ "*.*", COMP_NORMAL |INCLUDE_SUBDIR) = -38) then
MessageBox ("XCopyFile failed: Disk not enough space", SEVERE);
goto Dlg_PostStart;
endif;
Enable(LOGGING);

endif;

Dlg_PostStart:
i = " ";
end;


********************************************

What about?

Thanks.





Originally posted by alatten
Critical points are OnMoved and OnEnd events of the old version. They are executed during silent uninstall of old version with all system variables set to FirstTimeInstall, especially MAINTENANCE ist set to FALSE. So if you have some script code in these events, that runs in trouble if nothing is left on the machine, and protected it with

if(!MAINTENANCE)
DangerousCode;
endif;
your silent install may crash together with your whole upgrade...

HTH,
Andrees

alatten
10-28-2003, 02:55 AM
Hmm, your posted Events don't look 'dangerous'. Are you sure, they are the same in the old script? What about other Events, like OnBegin, in old script? Have you tried to create a log of the Upgrade? No hints in the log what is causing trouble?
Then, I'm also out of ideas...

Andrees

texatexa
10-28-2003, 04:11 AM
Hi Andrees,

thank you for your reply.
Probably I 've found where is the problem.

I wrote inside old setup OnInstallFilesActionBefore event:
...
Disable(LOGGING)
...
Enable(LOGGING)
...

I've rebuilt old setup without these commands on OnInstallFilesActionBefore.

If these two operations are not present on old setup function, automatic uninstalling (Major upgrade) works fine.
Then I suppose that operations are dangerous inside this function.

Your comment about this?

Unfortunatly we have delivered one thousand maybe more copies of this bugged setup (version 13), and we discovered the problem preparing the new release (version 14).

To avoid manual uninstallation of vesrsion 13, I'd like to discover a trick to make also the new 14 setup working fine.

We are now investigating if with "IDriver.exe /M{Your Product GUID} /uninst" we can uninstall the previous version from within the script of the 14 version.

Again, any comment about this?

Thanks for your help.

Nicola
Texa






Originally posted by alatten
Hmm, your posted Events don't look 'dangerous'. Are you sure, they are the same in the old script? What about other Events, like OnBegin, in old script? Have you tried to create a log of the Upgrade? No hints in the log what is causing trouble?
Then, I'm also out of ideas...

Andrees

alatten
10-28-2003, 04:40 AM
OK, I stopped to be surprised what can cause trouble during upgrades... :mad: Anyway, before we now ship any release, I check the upgrade to the subsequent version, by just modifying a little text file, change the corresponding GUIDs and run a test upgrade. If it's OK, I switch back to my backup-copy of the Install-Project.

However, it will not help you anymore with the shipped release... If I remember it right, my experiences with the /uninst switch haven't been very good. But I don't know anymore what was happening. Have you seen KB article 106685 (http://support.installshield.com/kb/view.asp?pcode=ALL&articleid=Q106685) about silent uninstalls with Response Files? This may be your workaround.

Good luck,
Andrees

texatexa
10-28-2003, 07:47 AM
You are right... /uninst doesn't work at all. We did like 106685 (http://support.installshield.com/kb/view.asp?pcode=ALL&articleid=Q106685) explain and we could uninstall the previous version.
Now we will test this solution with the other version of Windows we support.

Thanks and a final question: persist in using Developer InstallShield is only a faith fact?

Bye.
Nicola
TEXA



Originally posted by alatten
OK, I stopped to be surprised what can cause trouble during upgrades... :mad: Anyway, before we now ship any release, I check the upgrade to the subsequent version, by just modifying a little text file, change the corresponding GUIDs and run a test upgrade. If it's OK, I switch back to my backup-copy of the Install-Project.

However, it will not help you anymore with the shipped release... If I remember it right, my experiences with the /uninst switch haven't been very good. But I don't know anymore what was happening. Have you seen KB article 106685 (http://support.installshield.com/kb/view.asp?pcode=ALL&articleid=Q106685) about silent uninstalls with Response Files? This may be your workaround.

Good luck,
Andrees

alatten
10-29-2003, 03:02 AM
Well, regarding your final question, I must say that I see it from a consultants point of view: if it would be easy, everybody could do it, and I would loose my job... ;)

Andrees

texatexa
10-29-2003, 04:48 AM
Ok Andrees. Then we are going to keep you busy for next ten years!!
:)

Thanks.