How to perform unattended installs of the .NET Framework 2.0 redist and SDK
I received a question from a customer about how to perform a sequential unattended install of the .NET Framework 2.0 redistributable package and SDK. I have written a couple of different posts in the past about the various command line parameters available for the .NET Framework 2.0 setup and some of the options for silent installs (for example, the posts here, here and here). However, I realized that I've been sort of scattering this information across multiple blog posts and not providing simple, easy to understand examples of real world scenarios like this unattended install, so I'm going to try to start addressing that with this post.
Here are example command lines you can use to perform unattended installations for the .NET Framework 2.0 redistributable and SDK.
Silent installation
These command lines will run the .NET Framework 2.0 redist and SDK setups in fully silent mode. The setup package will extract to a temporary location and installation will begin with no user interaction and no visible UI. The user will see no visible indication that setup is running.
- dotnetfx.exe /q:a /c:"install.exe /q"
- setup.exe /q:a /c:"install.exe /q"
Standard unattended installation
These command lines will run the .NET Framework 2.0 redist and SDK setups in standard unattended mode. The setup package will extract to a temporary location and installation will begin with no user interaction. A progress dialog will appear on the screen during installation, and it will disappear when setup is complete. Errors encountered during installation might pop up message boxes during installation if they occur.
- dotnetfx.exe /q:a /c:"install.exe /qb"
- setup.exe /q:a /c:"install.exe /qb"
Unattended installation with no cancel button available in the UI
These command lines will run the .NET Framework 2.0 redist and SDK setups in unattended mode with no cancel button. The behavior of setup is the same as with the command lines above except the cancel button will be hidden on the progress page during installation. This allows the user to know that a setup is in progress but prevent them from cancelling it (unless they kill the process in Task Manager).
- dotnetfx.exe /q:a /c:"install.exe /qb!"
- setup.exe /q:a /c:"install.exe /qb!"
Important notes to consider
- The .NET Framework 2.0 has 3 versions - a 32-bit version, an Intel 64-bit version and an AMD64 version. You will need to select the correct versions of the setup packages for the .NET Framework 2.0 redist and SDK to install on your system using these command lines
- The .NET Framework 2.0 SDK requires that the redistributable is already installed. Your unattended installation script will need to start the redistributable setup, wait for it to complete, and check the return code to determine whether or not it installed successfully before trying to run the SDK setup. A return code of 0 means success with no reboot required, 3010 means success with a reboot required and any other return code means failure
Comments
- Anonymous
January 14, 2006
The comment has been removed - Anonymous
January 14, 2006
About the three different versions of the framework: Is it correctly understood that the Intel 64 version is for Itanium and that the AMD64 version also covers Intel Xeon with 64 bit extensions? - Anonymous
January 15, 2006
Hi Tzagotta and Rasmus - thank you for the good questions here. I created a new blog post with the answers to all of these questions. You can find the new post at http://blogs.msdn.com/astebner/archive/2006/01/15/513125.aspx.
Please let me know if you have any additional questions or concerns. - Anonymous
February 07, 2006
Hi, the Standard unattended installation doesn't run. By the second step there is the error I should use the control panel to add / remove software.
I use Windows XP Pro with SP2.
Thanks for your help.
Karsten Burger - Anonymous
February 07, 2006
Hi Karsten - You will need to make sure to run the commands with the fully qualified path to setup.exe because otherwise Windows will use a default folder order and try to launch the setup.exe in %windir%system32.
So you should use something like:
c:downloadsnetfx20sdksetup.exe /q:a /c:"install.exe /qb" - Anonymous
February 07, 2006
The comment has been removed - Anonymous
February 07, 2006
Sry, for my stupid questions.
First step: dotnetfx.exe /q:a /c:"install.exe /qb" in the Directory C:tmp which contains dotnetfx.exe
Where ist now the setup.exe File? - Anonymous
February 08, 2006
Hi Karsten - The file dotnetfx.exe is the setup package for the .NET Framework redistributable. The file setup.exe is the setup package for the .NET Framework SDK. If you only want to install the redist, you won't have a file named setup.exe. If you want the SDK, you will have to download its setup.exe separately from http://msdn.microsoft.com/netframework/downloads/updates - Anonymous
March 03, 2006
I have noticed that if try the unattended installation of dotnet 2 and if I dont have Windows Installer 3.0 or greater installed then the dotnet installation fails without error. To go around it, i made a bootstrapper that checks the windows installer version and installs it if needed and then calls the dotnetfx.exe which solves the problem. Is this a good workaround? or there is a simpler way? - Anonymous
March 03, 2006
Hi Fahad - If you perform an unattended install of the .NET Framework 2.0 and you do not have Windows Installer 3.0 installed, you will not see any visible error, but the return code from the installer should indicate failure. In this case, I would suggest that you check for the presence of Windows Installer 3.0 or higher in the bootstrapper that you are using to launch .NET Framework setup. - Anonymous
April 11, 2006
The comment has been removed - Anonymous
November 23, 2011
The comment has been removed - Anonymous
November 26, 2011
The comment has been removed - Anonymous
April 28, 2014
Very Good