deal with required reboot after uninstallation on Upgrade

Got a problem you cannot solve? Try here.
alibaba
Posts: 314
Joined: Fri Jun 26, 2009 8:46 am
Location: Thuringia, Germany

deal with required reboot after uninstallation on Upgrade

Postby alibaba » Thu Feb 16, 2012 9:21 am

Hi what should I do if in an upgrade scenario the previous version uninstallation needs a reboot?

The IA templates cannot deal with this case cause there the setup just goes on with installing the new version and then after a reboot all pending file operations from HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations are done and you will have an inkonsisten installation.

In InstallShield this was handled automatically so please could someone tell me how to deal with this problem?

Should I restart and then start the setup again and jump directly to the point after previous version uninstallation?

giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: deal with required reboot after uninstallation on Upgrad

Postby giaviv » Fri Feb 17, 2012 9:24 pm

Hi,

I don't really see how this would be special - just reboot and resume setup when necessary.
What exactly is the issue?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

alibaba
Posts: 314
Joined: Fri Jun 26, 2009 8:46 am
Location: Thuringia, Germany

Re: deal with required reboot after uninstallation on Upgrad

Postby alibaba » Mon Feb 20, 2012 2:41 am

I have no idea how to resume an IA setup...What should I use to jump to the special script line where setup was left because of the needed resume.

Should I work with labels and start setup with a special parameter like "RESUME" and then jump directly to the installation part in the script?
Anybody experiences with this?

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: deal with required reboot after uninstallation on Upgrad

Postby FrancescoT » Mon Feb 20, 2012 8:34 am

Dear Alibaba,

If I understood well what are you trying to do:

You want that after a system reboot, that you may trigger after a prevoius version uninstall, once the installation restarts again, you would like to execute some specific code?
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

alibaba
Posts: 314
Joined: Fri Jun 26, 2009 8:46 am
Location: Thuringia, Germany

Re: deal with required reboot after uninstallation on Upgrad

Postby alibaba » Mon Feb 20, 2012 9:18 am

Hi FrancescoT,

I just want to continue the script where it was left because of the restart. That would be after the uninstallation or with other words before the installation. So I don't want to execute specific code, just carry on the script.

Normally the setup script is this way:

Detection and other stuff > uninstallation > installation

Now it should be this way:

Detection and other stuff > uninstallation > Restart > installation

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: deal with required reboot after uninstallation on Upgrad

Postby FrancescoT » Mon Feb 20, 2012 9:38 am

Dear Alibaba,

If I have not missed anything, This is so simple!

In your script just after the code line that execute the uninstall for the previous version, uncoditionally add a "Restart and Resume" command.

Example
In the Install Application Prerequisite - Region, you have the following line of code:

Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)

Just after add the command:
Reboot Computer and Resume Setup

In this way your setup if it finds a previous version, will ask you to remove before continue. Once removed, the system will be restarted and the setup will restart automatically again and it will continue from the previous point.

I think that should help you.
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

alibaba
Posts: 314
Joined: Fri Jun 26, 2009 8:46 am
Location: Thuringia, Germany

Re: deal with required reboot after uninstallation on Upgrad

Postby alibaba » Tue Feb 21, 2012 3:41 am

Hi Francesco,

thank you for your great support! I do not know how I could have missed this command. You are right, everything is already there in the IA IDE...

But differently than in your variant I will add the "Restart and Remove" command conditionally namely when Apply uninstall returns REBOOT. Is this okay, or not needed?

There is one follow up question: in the IA help it is suggested to use "Reboot and Login" Command to support Pin to Taskbar feature. Do I really need this if I make use of this PtT feature?

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: deal with required reboot after uninstallation on Upgrad

Postby FrancescoT » Tue Feb 21, 2012 8:57 am

Hi Alibaba,

do not worry, I miss things sometimes too!!

You can use the command has you prefer. if you evaluate a condition, obviously, the command will be triggered only when this condition is true.
It is up to you only ... there are not restrictions.

With "Reboot and Resume" command, the installation will restart before the Windows shell and other startup programs have been loaded.
With "Reboot and Login" the installation will restart after the Windows shell and other startup programs have been loaded.

So the use "Reboot and Login" is suggested when used during pre-requisite installation, especially if you are mainly targetting your installs to new OS such Vista and Win7.

But I repeat, It is up to you only ... you may test the differences and use that one for you most useful.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

alibaba
Posts: 314
Joined: Fri Jun 26, 2009 8:46 am
Location: Thuringia, Germany

Re: deal with required reboot after uninstallation on Upgrad

Postby alibaba » Mon Mar 05, 2012 9:00 am

I tested the function and now I am a bit disappointed cause I recognized that it is not really useful for my scenario. Since if I use this function after a ApplyRemove the setup will not be present on the computer and therefor cannot be started again. Also you have to jump to the script line where setup was left what also is not possible since I cannot set a parameter in the Reboot function. I think the reboot functions are only useful for prereq installations, if you call it later on you will have to implement it for my own.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: deal with required reboot after uninstallation on Upgrad

Postby FrancescoT » Mon Mar 05, 2012 10:17 am

Dear Alibaba,

I am sorry, but I was supposing that you was doing an install .. not an unInstall. Of course if you use it during an UnInstall it is very likely that you are unable to restart it.


Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: Google [Bot] and 28 guests