Does upgrade require an Uninstall?

Got a problem you cannot solve? Try here.
cwillis
Posts: 4
Joined: Sat Oct 08, 2005 1:36 pm

Does upgrade require an Uninstall?

Postby cwillis » Sat Oct 08, 2005 1:46 pm

I have the option set to automatically change the version upon each compile. What this seems to do is force an uninstall then reinstall. These extra steps really seem to confuse my customers.

So I turned the option off to change the version automatically, and then running the install again wouldn't overwrite previous version install's files. That's not what I want either.

Is there any way to have a re-run of the install just proceed without the uninstall and say something like 'upgraded previous to version x.x'?

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

Postby sinan » Sat Oct 08, 2005 5:48 pm

The uninstall is seamless - it does not require manual intervention on part of the user. All they have to do is click next :D

Note that if you want you can edit your setup script so the uninstall happens right before the new version install and does not require an extra wizard dialog step. Nothing is hard coded in InstallAware :D

cwillis
Posts: 4
Joined: Sat Oct 08, 2005 1:36 pm

Postby cwillis » Sun Oct 09, 2005 10:15 am

Some of the files that I install can be edited by the users after installation. I don't want these files to be replaced if the users have changed them. I did check the never replace option. Will the uninstall part of a upgrade remove these files that have been changed?
Thanks

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

Postby sinan » Sun Oct 09, 2005 2:49 pm

Yes, I'm afrait it would remove them.
Perhaps you can try using patches instead, for minor upgrades?

Or, you can always use the CopyFile (or MoveFile) WinAPI to backup/rename the files that have to be saved...and put them back into place after the new version has finished installing. The Call DLL Function InstallAware plug-in lets you call any Win32 DLL, including these functions.

cwillis
Posts: 4
Joined: Sat Oct 08, 2005 1:36 pm

Postby cwillis » Mon Oct 10, 2005 7:17 pm

Is it set in stone that an uninstall has to occur? If so, why can't it just overlay newer file versions? That's what I was accustomed to after using Wise for many years.

I didn't look into the patching because I think the help said patching didnt work for single exe installs, which is what I need.

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

Postby sinan » Mon Oct 10, 2005 7:49 pm

If you would like to approach Wise's effect, I believe you can achieve this by changing the product code of your project.

The way Windows Installer works is: if two MSI packages have the same product code, they are assumed to be the same product. This can wreak havoc when you install a different installer looking to Windows Installer as the same one already installed on the system.

The way InstallAware solves this is by changing the revision code each build, and recognizing that an older version of the product has been installed, and removing that. This would be the cleanest solution to the problem.

However if you want to replicate the Wise approach, just change the product code itself (not just the revision code, but also the product code). Then Windows Installer will think that you are installing a completely new product, and let the install do its work.

When doing this, remember to check for the existence of files you plan to preserve with an IF...END clause, so you install the files in the default package on top of the modified versions only if they do not already exist.

cwillis
Posts: 4
Joined: Sat Oct 08, 2005 1:36 pm

Postby cwillis » Fri Oct 14, 2005 10:13 am

Is there any way to check if a file has been modified by the user as compared to the installed version? Like some sort of file hash done by Windows Installer or something? If so it would be nice to replace files if the user had not modified them, or preserve them if they were user modified.

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

Postby sinan » Fri Oct 14, 2005 10:38 am

There is an option you could use, which is "never overwrite", part of the options available in the Install Files command.


Return to “Technical Support”

Who is online

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