.NET Framework 2/3 Installation on Windows 8 Release Preview

Trouble getting applications developed using .NET Framework 2 or 3 to install on Windows 8 Release Preview? “Error message 0x800f0906:  “Windows couldn’t connect to the Internet to download necessary files. Make sure that you’re connected to the Internet, and click Retry to try again.”?  Me too…

Windows 8 features a new “install on demand” model for optional OS features.  In Win7 and Vista, all optional components were cached on the hard drive for later install.  With Win8, all optional components are on the DVD, and available at install time.  However, if you want to enable features later, they will be downloaded from “the cloud” via Windows Update.  One problem… it does not work with WSUS (at least, not yet?).

There is a page on this on MSDN:

Their suggestion? “Please ask your administrator to enable the policy to use Windows Update instead of WSUS.”  Um… I don’t think so.

Instead, insert the Win 8 DVD (or mount the ISO, using the native Explorer right-click “mount” option… THANK YOU MICROSOFT!), then run the following command:

Dism /online /enable-feature /featurename:NetFx3 /All /Source:x:sourcessxs /LimitAccess

(where you use your DVD drive letter in place of “X:”)

Now I will need to look into enabling .NET framework 2-3.5 using unattend.xml. I don’t want everyone at UVM to have to do this, too.

Thunderbird 13 – The cloud arrives

Mozilla Thunderbird 13 arrived this week.  Guess what?  Our customized build process broke again.  Now, when you start TB for the first time, you get greeted with the option to create a new email account with one of Thunderbird’s “partners” (in other words, email providers who paid for the honor of being put in the “welcome to Thunderbird” start dialog).

With the assistance of the awesome Ben Coddington (who does not keep a blog, but should so that you can bask in his awesomeness), I was able to track down the place that the new-new account dialog is called, and kill it by switching a preference in the “thunderbird-all.js” file.

The preference is a Boolean named “mail.provider.enabled”, set in the thunderbird-all.js file, as documented here:
and referenced here:
and here:

I updated our Thunderbird build script to set this preference to “false”:

Echo modifying default "All Thunderbird" preferences…
……binsed.exe –binary "s/pref("mail.provider.enabled", true);/pref("mail.provider.enabled", false);/" .defaultsprefall-thunderbird_new.js
if errorlevel 1 goto err
MOVE /Y .defaultsprefall-thunderbird_new.js .defaultsprefall-thunderbird.js

The whole ugly build script is provided below:

REM Thunderbird customized build script for UVM.
REM Updated June 2012 for Thunderbird 13 support.
REM – 7z.exe, 7zr.exe and sed.exe in parallel "..bin" directory
REM – Unmodified Thunderbird installer in .source directory
REM – all required config files in .config directory
REM (including 7z control file, ISP Hook RDF file, and modified prefs.js)
REM – local JDK install with "jar.exe". Path to jar.exe will need to be updated in the jdk environment variable
REM OUTPUT: Fully modified Thunderbird installer in .Installer directory.
REM @echo on

set jdk="c:Program Files (x86)Javajdk1.6.0_27bin"

Echo Cleaning up old builds…
del .Installer*.exe
rmdir /s /q .build
set /P tbver=Enter Thunderbird version number to build (i.e. "6.0.2"):

Echo Extracting setup files from OEM Installer…
mkdir .buildtemp
..bin7zr x .source*.exe -o.build

Echo Extracting omni.ja contents…
mkdir .buildtemp
cd .buildtemp
%jdk%jar.exe xf ..coreomni.ja
if errorlevel 1 goto err

Echo modifying messenger functions…
……binsed.exe –binary "s/NewMailAccount(msgWindow, okCallback);/MsgAccountWizard(okCallback);/" .chromemessengercontentmessengermsgMail3PaneWindow_new.js
if errorlevel 1 goto err
MOVE /Y .chromemessengercontentmessengermsgMail3PaneWindow_new.js .chromemessengercontentmessengermsgMail3PaneWindow.js

Echo modifying default "All Thunderbird" preferences…
……binsed.exe –binary "s/pref("mail.provider.enabled", true);/pref("mail.provider.enabled", false);/" .defaultsprefall-thunderbird_new.js
if errorlevel 1 goto err
MOVE /Y .defaultsprefall-thunderbird_new.js .defaultsprefall-thunderbird.js

Echo modifying default mailnews preferences…
……binsed.exe –binary "s/try_ssl", 0)/try_ssl", 2)/" .defaultsprefmailnews_new.js
if errorlevel 1 goto err
MOVE /Y .defaultsprefmailnews_new.js .defaultsprefmailnews.js

Echo moving UVM modified prefs.js into place (note that this file is not actually used by Thunderbird!)
copy /Y ….configprefs.js .defaultsprofileprefs.js

Echo Repacking omni.ja…
del /f /q ..coreomni.ja
%jdk%jar.exe cf ..coreomni.ja *

Echo Copying UVM Custom ISP file to source…
cd ….
mkdir .buildcoreispen-US
copy /Y .configUVMMail.rdf .buildcoreispen-USUVMMail.rdf
if errorlevel 1 goto err
Echo Copying UVM default prefs.js to core directory (tbird no longer has a prefs.js by default, but it will be used if present)…
mkdir .buildcoredefaultsprofile
copy /Y .configprefs.js .buildcoredefaultsprofileprefs.js
if errorlevel 1 goto err

Echo Deleting temporary files that should not be present in the installer…
rmdir /s /q .buildtemp

Echo Repackaging Thunderbird installer…
..bin7zr a .InstallerUVM_Thunderbird_setup_%tbver%.7z .build*
copy /b ..bin7zS.sfx + .configconfig.txt + .InstallerUVM_Thunderbird_setup_%tbver%.7z .InstallerUVM_Thunderbird_setup_%tbver%.exe

Echo Cleaning up installation source…
del /s /f /q .build*.*
rmdir /s /q .buildcore
rmdir /s /q .build
del /f /q .InstallerUVM_Thunderbird_setup_%tbver%.7z
goto end

echo There was an error running a command.