Groups | Blog | Home
all groups > dotnet setup > april 2004 >

dotnet setup : How to patch previous installation?


Lauren Hines
4/12/2004 5:22:29 PM
I've developed a Windows Installer setup program to distribute my .NET app,
but I would like to know how to make a patch for it. Specifically, if I need
to install a newer version of a .dll that has been placed in the GAC (global
assembly cache) and was registered (Register property set to vsdraCOM).

Does the windows installer have an option for a patch or an update?

Any help is greatly appreciated.

Thanks,
Lauren Hines

Phil Wilson
4/13/2004 11:12:28 AM
Windows Installer does do patches, but you can't make them with Visual
Studio. The Windows Installer SDK has tools and documentation about building
patches (.msp files). You basically make a patch from the delta between the
first version of the MSI file and the new one. 3rd party tools
(InstallShield, Wise, see
http://www.installsite.org/pages/en/msi/authoring.htm) have features that
make patch creation easier.
--
Phil Wilson [MVP Windows Installer]
----
[quoted text, click to view]

Zia ur Rehman
4/13/2004 1:42:32 PM
Please see Merge Modules section in MSDN. It is specially targetted at
distributing dlls.

Also, to update a file you need to set the exclude property in File System
Editor to false. However, since its a dll, you might be interested in ony
updating it upon a certain condition.
For that create a Launch Condition and set the condition property of the dll
to that Launch Condition. Remember that normally the Launch Conditions
return boolean values.

Hope this helps a bit :)
Zia.

[quoted text, click to view]

Lauren Hines
4/13/2004 5:52:04 PM
Thank you for your help. I have been researching the Merge Modules and
testing different Launch Conditions in my project.

[quoted text, click to view]

Lauren Hines
4/13/2004 5:59:23 PM
Thank you for your help.

I have been looking into the .Net Application Updater Component as well as
the Updater Application Block for updating our product via a server. The
problem I am having is how to place the updated .dll into the GAC and
register it? We can't use gacutil and regasm because they aren't always
distributed. The .Net Windows Installer is the only other way I know how to
do this. I have looked at other 3rd party tools and have not found any
reference to doing this.

Please let me know if there is any way to do what I need to do.

Thanks again,
Lauren Hines

[quoted text, click to view]

Phil Wilson
4/15/2004 11:22:15 AM
If you search for msimsp in the Platform SDK you'll see docs for creating a
Windows Installer patch, a .msp file. Many 3rd party tools (
http://www.installsite.org/pages/en/msi/authoring.htm ) can create msp
files. Visual Studio's main way to upgrade products is the
RemovePreviousVersions project property.
My #1 piece of advice here is don't use the GAC. The assembly doesn't need
to be there for COM interop - it can be in an application folder. It can be
quite difficult to replace an assembly in the GAC unless you're willing to
update the assembly version.
This isn't a criticism of you or VS setup projects, but VS setups are fairly
basic and don't provide access to much of Windows Installer functionality.
The (more expensive!) products from InstallShield, Wise, Zero G etc make
more advanced things easier. You'll end up spending the money anyway,
whether it goes on your time or on buying a product that easily lets you
make patches.

(Shameless plug, but it covers making patches with Visual Studio and the
Installer SDK,
coming in May: http://apress.com/book/bookDisplay.html?bID=280 )
--
Phil Wilson
[MVP Windows Installer]
[quoted text, click to view]


AddThis Social Bookmark Button