Installing 'over' existing installation.

Got a problem you cannot solve? Try here.
NickDay
Posts: 145
Joined: Tue Oct 05, 2010 9:13 am

Installing 'over' existing installation.

Postby NickDay » Wed Nov 23, 2011 6:57 am

Hi,
I want to make an installer which can install 'over' an existing installation made with the same installer, but to a new target location, and with no maintenance dialog. I'm using IA12, and the native engine.

The best way I could think of doing this is to 'Apply Uninstall' right near the top of my MSIcode, after setting NATIVE_ENGINE to TRUE.
This worked, but the maintenance dialog was still displayed, if there had been an existing installation to install.
So I now do 'Set Variable MAINTENANCE' to FALSE just after the 'Apply Uninstall'.

This successfully suppressed the maintenance dialog, and everything looked OK.

However I am finding that if I uninstall my product, via the Windows 7 Programs and Features control panel, the installer does not exit after uninstalling; instead it proceeds through the installation process, asking me for a target directory etc; this was caused by my change to MAINTENANCE.

Am I going about this in the wrong way? What should I be doing?

Thanks,

Nick

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

Re: Installing 'over' existing installation.

Postby giaviv » Wed Nov 23, 2011 6:42 pm

Hey Nick,

When you rebuild your installer and run it, it will remove any previous version of the same software on the machine.
Is this not exactly what you were looking for?
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

NickDay
Posts: 145
Joined: Tue Oct 05, 2010 9:13 am

Re: Installing 'over' existing installation.

Postby NickDay » Thu Nov 24, 2011 6:07 am

Hi Aviv,
No, I want to run the same installer executable a second time, select a different installation location, and not see a maintenance dialog. I want to have the original files left behind or removed (no preference at this stage).

I'm about to post another related question which is more urgent, so if you are short of time this one can wait.

Nick

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

Re: Installing 'over' existing installation.

Postby giaviv » Thu Nov 24, 2011 12:10 pm

Nick,

Is "generate a new revision code upon rebuild" checked in your project settings?
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

NickDay
Posts: 145
Joined: Tue Oct 05, 2010 9:13 am

Re: Installing 'over' existing installation.

Postby NickDay » Fri Nov 25, 2011 5:07 am

Hi Aviv,

Yes, 'Change revision code automatically upon rebuild' is set.

But that does not apply in this case: I want to be able to run the _same_installer_ without rebuilding it, a second time, and for it to just prompt for a location and install the items there, without seeing the maintenance dialog and without the user having to uninstall first; is that possible?

Regards,

Nick

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

Re: Installing 'over' existing installation.

Postby giaviv » Fri Nov 25, 2011 9:15 am

Nick,

That would be possible if you call Transform Instance in the beginning of your MSIcode - read about this command in our help files.
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

NickDay
Posts: 145
Joined: Tue Oct 05, 2010 9:13 am

Re: Installing 'over' existing installation.

Postby NickDay » Fri Nov 25, 2011 10:13 am

Hi Aviv,
I originally had the 'standard' Transform Instance code in place, so the user saw a message to the effect that "x is already installed on this computer. Would you like to install a new copy of x? Click YES to ... etc.". But I am getting objections that "this is too complicated; why can't we just install a new copy?"
That's why I tried the silent uninstall as per the initial posting.

Are you suggesting that I should use Transform instance, suppress the above dialog, and automatically generate a new unique name?
This sounds a good idea but would cause a problem if the original copy were uninstalled, due to uninstallation of common files. I'd need to discuss that with my manager. Silent uninstallation looks a better option to me, if I can avoid the side effect I mentioned in my original posting.

Anyway, I have now been asked to put it back to how it was before I tried Transform Instance and silent uninstallation, so this question is not urgent.
If you can see a simple change to the code in my initial posting, which would give me the desired result, that would still be useful.

Many thanks,

Nick

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

Re: Installing 'over' existing installation.

Postby giaviv » Sat Nov 26, 2011 11:16 am

Nick,

Unfortunately I think that the best way to do this would be Transform Instance.
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

NickDay
Posts: 145
Joined: Tue Oct 05, 2010 9:13 am

Re: Installing 'over' existing installation.

Postby NickDay » Wed Nov 30, 2011 6:24 am

Thanks Aviv,
I'll assume you mean suppressing the dialog in the standard code, using TransformInstance, and automatically generating a unique name.
Thanks for your support.
Nick

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

Re: Installing 'over' existing installation.

Postby giaviv » Tue Dec 06, 2011 6:08 pm

Nick,

I apologize - I missed the fact that you were using the Native Engine when I said you should use Transform Instance.
This command only works for the Windows Installer engine.
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

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

Re: Installing 'over' existing installation.

Postby giaviv » Fri Dec 09, 2011 9:57 pm

Additionally, with the Native Engine you have all kinds of flexibility to do whatever you want as you need it.
You could just script in any behavior you would like - for example, if you want a silent uninstall, its achievable.
If you want to quit setup right after, you can do that with a call to Terminate Installation.
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

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Re: Installing 'over' existing installation.

Postby sinan » Sat Dec 10, 2011 6:33 am

I also wanted to clarify here that while you could comment out the old version removal and force an install on top of an older version with the MSI engine, this will wreak havoc with the MSI registry entries used by MSI internally for book-keeping, and will have the net result of leaving everything left on the system when doing an uninstall - simply because every internal MSI component will have "two clients" on the system, because you didn't decrement the client count when commenting out the uninstall.

However, the Native Engine is immune to this MSI processing overhead, of course. You could just as well comment out everything that does the uninstall in the Native Engine world. And you could just have the Native Engine install everything on top. When uninstalling, only those files marked as "shared" would remain on the target system, since they would be pre-existing and still be assumed to have left-over clients on the system.

So usually if the MSI engine is too limiting for you, just swap to the Native Engine. There's also very good reasons as to why the MSI engine does things the way it does, which I hope this post helps address.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 34 guests