How to install a Windows Update from an MSI package - windows

Is there a way to install Windows Updates from an MSI package installation??
I am authoring an MSI package in WiX which requires some Windows Updates to be installed in the machine.

Windows Installer was intended for the installation of Windows applications, rather than Windows updates or service packs. Your setup application may be able to invoke the Windows Update Stand-alone Installer (Wusa.exe) and the Windows Update Agent (WUA) API. However, the package developer would need to consider what their users would think of package that updates the system.

Related

preventing uninstallation of c++ redistributable

I'm using Advanced Installer in my product. as part of the installation, the installer installs c++ redistributables that my product needs in order to run. my question is how to prevent the user from removing the c++ redistributable installation in add/remove programs? is there an option to use reference counting on 3rd party products that the installer installs?
Have you considered using merge modules to install your redistributables? Instead of separate standalone installers. This is supported by Advanced Installer too.
This should prevent them from appearing in Control Panel, but they will also be uninstalled together with your application.
If you want to prevent the user from removing the redistributable installation from Add/Remove programs, please see the MSDN documentation: Configuring Add/Remove Programs with Windows Installer. You could use the ARPSYSTEMCOMPONENT property to prevent the redistributable from being displayed in the Add or Remove Programs list of Control Panel. This should hide the redistributable installation, but you can still use the Windows Installer to install, uninstall, repair, and reinstall the application. If the user uninstalls your application, it should be designed to also uninstall the redistributable. The recommended alternative to using concurrent installations is to instead use a setup application and external UI handler to install several Windows Installer packages sequentially.
Note however that Microsoft recommends that no one use concurrent installations to install or update a shipping product. A concurrent installation action installs another Windows Installer package during a currently running installation.

windows service msi installer created in vs2003 hangs in win7 while installing

We have few windows services developed using .Net framework 1.1(VS2003).For each windows service an msi installer(set up project) is created to make installation easier.These installers are able to install windows services successfully in windows XP.But these installers unable to install windows service in WIN7 though I have admin privileges on the machine in which I am trying install them.While I am trying to install the windows service in win7, Through msi installer,installation is progressing till 90%.After that it is neither completing nor throwing an error.I am unable to understand what the problem is.
I tried following ways.
1.Opened cmd window in admin mode and tried to execute the msi with the command msiexec -i --Din't work
2.Right clicked on the actual exe(windows service exe) file and tried to run it in admin mode.--Din't work
3.Changed the UAC to never notify, restarted the machine and then tried to install--Din't work
4.Right clicked on both exe and msi and open their properties and changed the compatibility to lower version of windows and tried to install--Din't work
One thing I have noticed is that for all the custom actions of our windows service installer, primary output of our main project(exe) was given as input.I build the msi installer by removing all the custom actions.Then i tried to install it in win7.Then it was installed.But during the installation system not prompted for account details (which is the actual case while installing windows service) and also the service was not appeared in services manager window.
I spent somuch time to identify the cause and resolution.But I dint find any posts on this issue.I suspect that the problem is with custom actions.But not sure.If the problem is with custom actions please let me know how to overcome it.
Please provide a resolution for this issue or share me if there are any links which talks about this.
FWIW, .NET 1.1 isn't supported on Win7. Also I'm guessing you are using InstallUtil custom actions to drive the setup of your .NET Windows Service. These are very fragile and you can eliminate all those brittle points by refactoring and using the ServiceInstall ServiceControl tables in MSI.

Windows Installer: Specifying the install order of prerequisites

I am using the Windows installer that comes with VS2010. This app uses .Net4 and will mainly run on xp machines. It also uses some third party assemblies that require .Net2.
If the pc is using XP SP2 I also need to install Windows Imagining Components.
Selecting .Net2 in the prerequsites will not install WIC and will try to install .Net2 on Windows 7 which casues an error.
If I check the .Net3 SP1 prerequisite this will include .Net2 and WIC. Unfortunately when the installer runs it first tries to install framework 4 before framework 3.5.
Is there a way of changing the order of the prerequisites so that 3.5 is installed before 4?
Here is the method to add WIC to your prerequisites list.
Quoted from above link:
"create a custom MSI Bootstrapper Package for WIC -and- add it as a dependency for the standard .NET bootstrapper package
I've created the bootstrapper and patch for the standard .NET bootstrapper which comes with VS.
Download this self-extracting archive , unpack to %PROGRAMFILES%\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages, and you're ready to go.
If everything is OK, you should see "Windows Imaging Component" in ClickOnce Prerequisites window. Add it to your project, and it should install fine from now on"
This may solve your problem, because if you select it in the list it will be installed before .Net 4 and there is no need to install .Net 2 beforehand.

How to create MSI package, which can install Windows installer itself

Is it possible to create MSI package, which will run without Windows installer installed in system, but first will install Windows installer itself, and then continue installing other components?
The goal is to create prerequisite package for our software, which must install some components, including some operation system service packs. We also prefer using MSI package. But it's obviously to us that our software will be installed on clean operation system. Though there will not be needed Windows installer present. Is it possible to create such prerequisite package using MSI?
No, there is no way to install an .MSI package without Windows Installer already being present in the OS.
However, Windows Installer has been a native part of Windows since Windows 2000. Are you really developing installers for Windows 95/98/NT4? That would be the only case where there is no Windows Installer support and you'd need to install a redistributable MSI package first.
Unless you meant to say that you require a higher version of Windows Installer than is native to one of the older OSes? (e.g. MSI 3.1 for WinXP) In that case, you'll need to bundle the .MSI redistributable for the MSI package you desire and run that first. Sometimes a reboot is required, other times not. YMMV.
One way, you can write an application in cpp or c or any language that does not require any additional frameworks or SDKs, to check for the installer and install it programatically.
It sounds like you need a bootstrapped with two or more msi files in it. Take look at the WiX documentation. WiX has build-in bootstrapped
Hope this helps
s

Installing DirectX with application MSI - VS2008

The application supports Windows XP, Vista, and Windows 7 but need DirectX libraries in order to work properly. I have the DirectX 9.0C Redistributable package and want to include it in my MSI installer created with a Visual Studio 2008 setup project.
Two pronged question:
How do I include the DirectX 9.0C package wiht my MSI?
Will the DirectX 9.0C package ignore Vista and Windows 7 automatically?
Do not include it in your msi package but execute it as a custom action or before the installation starts. Installing it in Vista or Win7 won't cause any issues.
Generally, unless you are distributing your app using DVD/CD to people that may not have the runtime, distribute your app with the Web installer executed as custom action that will search for the more updated version of D3DX

Resources