I previously posted a couple of blog items (here and here) where I mentioned the verbose logging command line switch for .NET Framework 2.0 setup. I heard from a friend of mine last week who was trying to run .NET Framework 2.0 setup using the same command line that he previously used for .NET Framework 1.1 setup but did not see a verbose log produced at all on his system, and asked me why.
After looking at this in more detail, I found a subtle difference in the command line switch parsing code for the .NET Framework setup in version 2.0 that I had not noticed until I heard about this scenario.
The command line to run the .NET Framework 1.1 setup in silent mode with verbose logging enabled is the following:
dotnetfx.exe /q:a /c:"install.exe /l /q"
This command line will cause a verbose log named %temp%\netfx.log to be created during installation.
In the .NET Framework 2.0, verbose logging is enabled by default, so you do not need to pass any extra command line switches during setup. As a result of this change, the code was changed so that the /l switch will only work correctly when you also pass a log file name immediately after it. When my friend tried to run .NET Framework 2.0 setup with the command line dotnetfx.exe /q:a /c:"install.exe /l /q" setup tried to create a log with the name /q, and that is not a valid file name so setup ended up not creating a verbose log at all.
This means that you can use the following command line to install the .NET Framework 2.0 in silent mode with verbose logging enabled:
dotnetfx.exe /q:a /c:"install.exe /q"
dotnetfx.exe /q:a /c:"install.exe /l %temp%\mynon-defaultlog.txt /q"
I've updated the above linked blog posts to reflect this, and I apologize for any inconvenience I may have caused based on the original content of those blog posts.