Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS with no warranties, and confer no rights. Additionally, views expressed herein are my own and not those of my employer, Microsoft.
I was helping a customer last week who wanted to push the .NET Framework 1.1 to a series of computers in a corporate network, but wanted to show some kind of progress UI on the client computers. I realized that we added an unattended switch to the setup wrapper for .NET Framework 1.1 based on some customer feedback from 1.0.
You can run .NET Framework 1.1 setup with the following command line switches to install using MSI basic UI:
dotnetfx.exe /q:a /c:"install.exe /qb /l"
This command line will cause the .NET Framework 1.1 to install with no user interaction required, but a small MSI progress bar will appear during installation so the user knows that something is happening on their machine. Note that as stated above, this /qb switch was added in .NET Framework 1.1, so this switch will not work in 1.0 setup.
Those of you with some knowledge of MSI command line parameters might ask why not just have customers extract the contents of dotnetfx.exe and then install netfx.msi directly. Or better yet, why not have them run dotnetfx.exe /q:a /c:"msiexec /i netfx.msi /qb /l*v" or something like that to achieve the same effect without needing to write new code to support the /qb switch for install.exe.
The answer to this is that we want customers who install the .NET Framework 1.0 and 1.1 to use install.exe to do so. There are several reason for this:
As a side note, in the .NET Framework 2.0, we implemented a custom action to install assemblies using fusion APIs directly, in part to eliminate the "chicken and egg" problem. As a result, we see nearly no 1935 errors while installing .NET Framework 2.0. The install.exe setup wrapper still stops the Windows Installer service before and after installation because of possible interactions with other versions of .NET Framework setup due to copies of other versions of fusion being loaded into memory during the 10 minute window that the service would otherwise stay running after installation. Also, .NET 2.0 does not carry Windows Installer 2.0 because of the high market penetration of Windows Installer and because Windows Installer 3.1 has been posted as a mandatory update on Windows Update. That makes bullet #2 above much less of an issue for administrators and 3rd party developers. However, we still recommend installing .NET Framework 2.0 using the install.exe wrapper even though we've improved the scenario of installing using netfx.msi directly.
Even though we recommend using install.exe to install the .NET Framework 1.1 and 2.0, setup will work in most cases when running the MSI directly. It requires more care on the part of administrators or 3rd party setup developers who redistribute the .NET Framework. In controlled environments (such as OEM pre-installations of the .NET Framework), it is much easier to control cases where the Windows Installer service might be running and shut it down separately by running net stop msiserver for example.
Does anyone know how to suppress the reboot dialog after installing .NET 1.1 service pack 1? According to Microsoft there's no way to prevent it, but there must be *some* way since InstallShield installers can do it. I can't believe MS has a simple command line switch to prevent reboots for the framework but didn't include a similar mechanism for the service pack.
Thanks!
Phil
Hi Pwinant - There is not a supported way to suppress only the reboot dialog but still show other UI in the service pack installer. You can use the /q switch to perform a fully silent install, which will suppress the reboot dialog along with all other UI.