Difference between revisions of "Thunderbird"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(Removing access to Outlook Express)
m
Line 8: Line 8:
 
For uninstall, you'll want:
 
For uninstall, you'll want:
  
<pre>
+
<source lang="xml">
 
<remove cmd='"%PROGRAMFILES%\Mozilla Thunderbird\uninstall\helper.exe" /S' />
 
<remove cmd='"%PROGRAMFILES%\Mozilla Thunderbird\uninstall\helper.exe" /S' />
</pre>
+
</source>
 +
 
  
 
== General info for version 1.5 ==
 
== General info for version 1.5 ==
Line 21: Line 22:
 
When a new version comes out, just replace the installer in "upgrade cmd" with a new one, and then increment the package revision number - this puts the upgrade command to work.
 
When a new version comes out, just replace the installer in "upgrade cmd" with a new one, and then increment the package revision number - this puts the upgrade command to work.
  
<package  
+
<source lang="xml">
 +
<package  
 
       id="thunderbird"  
 
       id="thunderbird"  
 
       name="Mozilla Thunderbird"  
 
       name="Mozilla Thunderbird"  
Line 35: Line 37:
 
   
 
   
 
   <remove cmd='"%PROGRAMFILES%\Mozilla Thunderbird\uninstall\uninstall.exe" -ms' />
 
   <remove cmd='"%PROGRAMFILES%\Mozilla Thunderbird\uninstall\uninstall.exe" -ms' />
</package>
+
</package>
 +
</source>
 +
 
  
 
== Making Thunderbird a default mail and news client ==
 
== Making Thunderbird a default mail and news client ==
Line 43: Line 47:
 
'''Note:''' Make sure to change the path MOZILL~2 to MOZILL~1 if you have installed Thunderbird before Firefox or any other Mozilla product. (check on the command line by typing "cd %programfiles%\MOZILL~2")
 
'''Note:''' Make sure to change the path MOZILL~2 to MOZILL~1 if you have installed Thunderbird before Firefox or any other Mozilla product. (check on the command line by typing "cd %programfiles%\MOZILL~2")
  
REGEDIT4
+
<source lang="reg">
+
REGEDIT4
[HKEY_CLASSES_ROOT\mailto]
+
@="URL:MailTo Protocol"
+
"URL Protocol"=""
+
[HKEY_CLASSES_ROOT\mailto\DefaultIcon]
+
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
+
[HKEY_CLASSES_ROOT\mailto\shell\open\command]
+
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -compose %1"
+
[HKEY_CLASSES_ROOT\news]
+
@="URL:News Protocol"
+
"URL Protocol"=""
+
[HKEY_CLASSES_ROOT\news\DefaultIcon]
+
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
+
[HKEY_CLASSES_ROOT\news\shell\open\command]
+
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -mail %1"
+
[HKEY_CLASSES_ROOT\nntp]
+
@="URL:NNTP Protocol"
+
"URL Protocol"=""
+
[HKEY_CLASSES_ROOT\nntp\DefaultIcon]
+
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
+
[HKEY_CLASSES_ROOT\nntp\shell\open\command]
+
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -mail %1"
+
[HKEY_CLASSES_ROOT\snews]
+
@="URL:Snews Protocol"
+
"URL Protocol"=""
+
[HKEY_CLASSES_ROOT\snews\DefaultIcon]
+
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
+
[HKEY_CLASSES_ROOT\snews\shell\open\command]
+
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -mail %1"
+
[HKEY_CURRENT_USER\Software\Clients\Mail]
+
@="Mozilla Thunderbird"
+
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail]
+
@="Mozilla Thunderbird"
+
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\News]
+
@="Mozilla Thunderbird"
+
  
 +
[HKEY_CLASSES_ROOT\mailto]
 +
@="URL:MailTo Protocol"
 +
"URL Protocol"=""
 +
[HKEY_CLASSES_ROOT\mailto\DefaultIcon]
 +
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
 +
[HKEY_CLASSES_ROOT\mailto\shell\open\command]
 +
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -compose %1"
 +
[HKEY_CLASSES_ROOT\news]
 +
@="URL:News Protocol"
 +
"URL Protocol"=""
 +
[HKEY_CLASSES_ROOT\news\DefaultIcon]
 +
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
 +
[HKEY_CLASSES_ROOT\news\shell\open\command]
 +
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -mail %1"
 +
[HKEY_CLASSES_ROOT\nntp]
 +
@="URL:NNTP Protocol"
 +
"URL Protocol"=""
 +
[HKEY_CLASSES_ROOT\nntp\DefaultIcon]
 +
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
 +
[HKEY_CLASSES_ROOT\nntp\shell\open\command]
 +
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -mail %1"
 +
[HKEY_CLASSES_ROOT\snews]
 +
@="URL:Snews Protocol"
 +
"URL Protocol"=""
 +
[HKEY_CLASSES_ROOT\snews\DefaultIcon]
 +
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
 +
[HKEY_CLASSES_ROOT\snews\shell\open\command]
 +
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -mail %1"
 +
[HKEY_CURRENT_USER\Software\Clients\Mail]
 +
@="Mozilla Thunderbird"
 +
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail]
 +
@="Mozilla Thunderbird"
 +
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\News]
 +
@="Mozilla Thunderbird"
 +
</source>
  
 
To register it with WPKG, save it as thunderbird.REG, and add these entries to your Thunderbird XML:
 
To register it with WPKG, save it as thunderbird.REG, and add these entries to your Thunderbird XML:
  
 +
<source lang="xml">
 
   <install cmd='regedit /s %SOFTWARE%\Thunderbird\thunderbird.REG' />
 
   <install cmd='regedit /s %SOFTWARE%\Thunderbird\thunderbird.REG' />
 
    
 
    
 
   <upgrade cmd='regedit /s %SOFTWARE%\Thunderbird\thunderbird.REG' />
 
   <upgrade cmd='regedit /s %SOFTWARE%\Thunderbird\thunderbird.REG' />
 +
</source>
 +
  
 
Alternatively, you can use this jscript file to use full path names:
 
Alternatively, you can use this jscript file to use full path names:
  
  var WshShell = WScript.CreateObject("WScript.Shell");
+
<source lang="js">
  var key;
+
var WshShell = WScript.CreateObject("WScript.Shell");
  var value;
+
var key;
 
+
var value;
  key = "HKEY_CLASSES_ROOT\\mailto\\";
+
 
  value = "URL:MailTo Protocol";
+
key = "HKEY_CLASSES_ROOT\\mailto\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = "URL:MailTo Protocol";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
  key = "HKEY_CLASSES_ROOT\\mailto\\URL Protocol";
+
 
  value = "";
+
key = "HKEY_CLASSES_ROOT\\mailto\\URL Protocol";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = "";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
  key = "HKEY_CLASSES_ROOT\\mailto\\defaultIcon\\";
+
 
  value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
+
key = "HKEY_CLASSES_ROOT\\mailto\\defaultIcon\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
  key = "HKEY_CLASSES_ROOT\\mailto\\shell\\open\\command\\";
+
 
  value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -compose %1";
+
key = "HKEY_CLASSES_ROOT\\mailto\\shell\\open\\command\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -compose %1";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
 
+
 
  key = "HKEY_CLASSES_ROOT\\news\\";
+
 
  value = "URL:News Protocol";
+
key = "HKEY_CLASSES_ROOT\\news\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = "URL:News Protocol";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
  key = "HKEY_CLASSES_ROOT\\news\\URL Protocol";
+
 
  value = "";
+
key = "HKEY_CLASSES_ROOT\\news\\URL Protocol";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = "";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
  key = "HKEY_CLASSES_ROOT\\news\\defaultIcon\\";
+
 
  value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
+
key = "HKEY_CLASSES_ROOT\\news\\defaultIcon\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
  key = "HKEY_CLASSES_ROOT\\news\\shell\\open\\command\\";
+
 
  value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -mail %1";
+
key = "HKEY_CLASSES_ROOT\\news\\shell\\open\\command\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -mail %1";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
 
+
 
  key = "HKEY_CLASSES_ROOT\\nntp\\";
+
 
  value = "URL:NNTP Protocol";
+
key = "HKEY_CLASSES_ROOT\\nntp\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = "URL:NNTP Protocol";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
  key = "HKEY_CLASSES_ROOT\\nntp\\URL Protocol";
+
 
  value = "";
+
key = "HKEY_CLASSES_ROOT\\nntp\\URL Protocol";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = "";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
  key = "HKEY_CLASSES_ROOT\\nntp\\defaultIcon\\";
+
 
  value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
+
key = "HKEY_CLASSES_ROOT\\nntp\\defaultIcon\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
  key = "HKEY_CLASSES_ROOT\\nntp\\shell\\open\\command\\";
+
 
  value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -mail %1";
+
key = "HKEY_CLASSES_ROOT\\nntp\\shell\\open\\command\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -mail %1";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
 
+
 
  key = "HKEY_CLASSES_ROOT\\snews\\";
+
 
  value = "URL:Snews Protocol";
+
key = "HKEY_CLASSES_ROOT\\snews\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = "URL:Snews Protocol";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
  key = "HKEY_CLASSES_ROOT\\snews\\URL Protocol";
+
 
  value = "";
+
key = "HKEY_CLASSES_ROOT\\snews\\URL Protocol";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = "";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
  key = "HKEY_CLASSES_ROOT\\snews\\defaultIcon\\";
+
 
  value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
+
key = "HKEY_CLASSES_ROOT\\snews\\defaultIcon\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
  key = "HKEY_CLASSES_ROOT\\snews\\shell\\open\\command\\";
+
 
  value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -mail %1";
+
key = "HKEY_CLASSES_ROOT\\snews\\shell\\open\\command\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -mail %1";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
 
+
 
  key = "HKEY_CURRENT_USER\\Software\\Clients\\Mail\\";
+
 
  value = "Mozilla Thunderbird";
+
key = "HKEY_CURRENT_USER\\Software\\Clients\\Mail\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = "Mozilla Thunderbird";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
  key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Clients\\Mail\\";
+
 
  value = "Mozilla Thunderbird";
+
key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Clients\\Mail\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = "Mozilla Thunderbird";
 
+
WshShell.RegWrite(key, value, "REG_SZ");
  key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Clients\\News\\";
+
 
  value = "Mozilla Thunderbird";
+
key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Clients\\News\\";
  WshShell.RegWrite(key, value, "REG_SZ");
+
value = "Mozilla Thunderbird";
 +
WshShell.RegWrite(key, value, "REG_SZ");
 +
</source>
 +
 
  
 +
And then add this to your XML package definition:
  
For wpkg:
+
<source lang="xml">
 +
  <install cmd='cscript %SOFTWARE%\Thunderbird\setdefault.js' />
 +
  <upgrade cmd='cscript %SOFTWARE%\Thunderbird\setdefault.js' />
 +
</source>
  
  <install cmd='wscript %SOFTWARE%\Thunderbird\setdefault.js' />
 
  <upgrade cmd='wscript %SOFTWARE%\Thunderbird\setdefault.js' />
 
  
 
== Silent installation of Thunderbird extensions ==
 
== Silent installation of Thunderbird extensions ==
Line 191: Line 204:
 
* the silent installer will look like this:
 
* the silent installer will look like this:
  
<package
+
<source lang="xml">
 +
<package
 
     id="thunderbird-quicktext"
 
     id="thunderbird-quicktext"
 
     name="Quicktext extension"
 
     name="Quicktext extension"
Line 205: Line 219:
 
   
 
   
 
     <remove cmd='cmd /C rmdir /S /Q "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{8845E3B3-E8FB-40E2-95E9-EC40294818C4}"' />
 
     <remove cmd='cmd /C rmdir /S /Q "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{8845E3B3-E8FB-40E2-95E9-EC40294818C4}"' />
</package>
+
</package>
 +
</source>
 +
 
  
 
* Basically, it means you have to copy the folder named similar to {8845E3B3-E8FB-40E2-95E9-EC40294818C4} to your "%PROGRAMFILES%\Mozilla Thunderbird\extensions" folder
 
* Basically, it means you have to copy the folder named similar to {8845E3B3-E8FB-40E2-95E9-EC40294818C4} to your "%PROGRAMFILES%\Mozilla Thunderbird\extensions" folder
 
* when Mozilla Thunderbird is next started, a new extension is detected automatically - you can verify this in Thunderbird using Tools -> Extensions
 
* when Mozilla Thunderbird is next started, a new extension is detected automatically - you can verify this in Thunderbird using Tools -> Extensions
  
'''Version 1.5'''
+
 
 
== Silent installation of dictionaries (spell-checking) ==
 
== Silent installation of dictionaries (spell-checking) ==
 +
 +
'''Version 1.5'''
  
 
Mozilla Thunderbird keeps its (MySpell) dictionaries in <code>%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\</code>.
 
Mozilla Thunderbird keeps its (MySpell) dictionaries in <code>%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\</code>.
Line 226: Line 244:
 
* The XML which installs the German dictionary for Thunderbird should look like this:
 
* The XML which installs the German dictionary for Thunderbird should look like this:
  
<package
+
<source lang="xml">
 +
<package
 
     id="thunderbird-woerterbuch"
 
     id="thunderbird-woerterbuch"
 
     name="Woerterbuch fuer Thunderbird"
 
     name="Woerterbuch fuer Thunderbird"
Line 242: Line 261:
 
   
 
   
 
     <remove cmd='cmd /C del "%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\Deutsch - neue Rechtschreibung.*"' />
 
     <remove cmd='cmd /C del "%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\Deutsch - neue Rechtschreibung.*"' />
</package>
+
</package>
 +
</source>
  
 
'''Version 2.0'''
 
'''Version 2.0'''
Line 248: Line 268:
  
 
thunderbird.exe -install-global-extension "x:\software\deutsches_w_ouml_rterbuch-1.0.1-fx+zm+tb.xpi"
 
thunderbird.exe -install-global-extension "x:\software\deutsches_w_ouml_rterbuch-1.0.1-fx+zm+tb.xpi"
 +
  
 
== Disable auto update ==
 
== Disable auto update ==
Line 254: Line 275:
  
 
''Note'' This won't work anymore (at least in 2.0.0.6), seems like a bug. It is already files as a bug here [https://bugzilla.mozilla.org/show_bug.cgi?id=395660]. Keep yourself updated on the bug page.
 
''Note'' This won't work anymore (at least in 2.0.0.6), seems like a bug. It is already files as a bug here [https://bugzilla.mozilla.org/show_bug.cgi?id=395660]. Keep yourself updated on the bug page.
 +
  
 
== Removing access to Outlook Express ==
 
== Removing access to Outlook Express ==
Line 259: Line 281:
 
If you want to remove access to OE, see [[Outlook Express]].
 
If you want to remove access to OE, see [[Outlook Express]].
  
[[category:Silent Installers]]
 
  
 
== Using thunderbird autoconfig ==
 
== Using thunderbird autoconfig ==
Line 267: Line 288:
 
Create a customized text file named thunderbird.cfg and put it in the thunderbird executable folder:
 
Create a customized text file named thunderbird.cfg and put it in the thunderbird executable folder:
  
  '%programfiles%\mozilla thunderbird\thunderbird.cfg'
+
<source lang="dos">
 +
'%programfiles%\mozilla thunderbird\thunderbird.cfg'
 +
</source>
  
 
Edit %programfiles%\mozilla thunderbird\greprefs\all.js addding the following values:
 
Edit %programfiles%\mozilla thunderbird\greprefs\all.js addding the following values:
 
+
<source lang="js">
  pref("general.config.obscure_value", 0);
+
pref("general.config.obscure_value", 0);
  pref("general.config.filename", "thunderbird.cfg");
+
pref("general.config.filename", "thunderbird.cfg");
 +
</source>
  
 
''Note: Byteshifting does not seem to be required with versions 1.5.* or 2.0.*''
 
''Note: Byteshifting does not seem to be required with versions 1.5.* or 2.0.*''
Line 280: Line 304:
 
Example thunderbird.cfg with automatically assigned values from ldap.
 
Example thunderbird.cfg with automatically assigned values from ldap.
  
<pre>//put everything in a try/catch
+
<source lang="js">
 +
//put everything in a try/catch
 
try {
 
try {
 
   
 
   
Line 348: Line 373:
 
} catch(e) {
 
} catch(e) {
 
   displayError("lockedPref", e);
 
   displayError("lockedPref", e);
}</pre>
+
}
 +
</source>
 +
 
 +
 
 +
[[category:Silent Installers]]

Revision as of 17:41, 23 April 2008

General info for version 2

"New Windows installer: Based on Nullsoft Scriptable Install System, the new Windows installer resolves many long-standing issues." http://www.mozilla.com/en-US/thunderbird/2.0.0.0/releasenotes/

Despite the change of installers, the -ms flag works instead of /s to do silent install.

For uninstall, you'll want:

<remove cmd='"%PROGRAMFILES%\Mozilla Thunderbird\uninstall\helper.exe" /S' />


General info for version 1.5

This is a silent installer and uninstaller for Mozilla Thunderbird 1.5, but it should work with other versions of Thunderbird, too.

If you have a lower version of Thunderbird installed, it will be automatically removed before Mozilla Thunderbird 1.5 installs.

As the Thunderbird install now nicely upgrades and doesn't leave the old one in the registry, there is no need to differentiate versions in package id. When a new version comes out, just replace the installer in "upgrade cmd" with a new one, and then increment the package revision number - this puts the upgrade command to work.

<package 
      id="thunderbird" 
      name="Mozilla Thunderbird" 
      revision="15041" 
      reboot="false" 
      priority="0">
 
  <check type="uninstall" condition="exists" path="Mozilla Thunderbird (1.5)" />
 
  <install cmd='"%SOFTWARE%\Thunderbird\Thunderbird Setup 1.5.0.4.exe" -ms' />
 
  <upgrade cmd='"%SOFTWARE%\Thunderbird\Thunderbird Setup 1.5.0.4.exe" -ms' />
 
  <remove cmd='"%PROGRAMFILES%\Mozilla Thunderbird\uninstall\uninstall.exe" -ms' />
</package>


Making Thunderbird a default mail and news client

If you want to make Mozilla Thunderbird a default mail and news client, add these registry entries:

Note: Make sure to change the path MOZILL~2 to MOZILL~1 if you have installed Thunderbird before Firefox or any other Mozilla product. (check on the command line by typing "cd %programfiles%\MOZILL~2")

REGEDIT4

[HKEY_CLASSES_ROOT\mailto]
@="URL:MailTo Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\mailto\DefaultIcon]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
[HKEY_CLASSES_ROOT\mailto\shell\open\command]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -compose %1"
[HKEY_CLASSES_ROOT\news]
@="URL:News Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\news\DefaultIcon]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
[HKEY_CLASSES_ROOT\news\shell\open\command]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -mail %1"
[HKEY_CLASSES_ROOT\nntp]
@="URL:NNTP Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\nntp\DefaultIcon]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
[HKEY_CLASSES_ROOT\nntp\shell\open\command]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -mail %1"
[HKEY_CLASSES_ROOT\snews]
@="URL:Snews Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\snews\DefaultIcon]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE,0"
[HKEY_CLASSES_ROOT\snews\shell\open\command]
@="@ShortProgFiles\\MOZILL~2\\THUNDE~1.EXE -mail %1"
[HKEY_CURRENT_USER\Software\Clients\Mail]
@="Mozilla Thunderbird"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail]
@="Mozilla Thunderbird"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\News]
@="Mozilla Thunderbird"

To register it with WPKG, save it as thunderbird.REG, and add these entries to your Thunderbird XML:

  <install cmd='regedit /s %SOFTWARE%\Thunderbird\thunderbird.REG' />
  
  <upgrade cmd='regedit /s %SOFTWARE%\Thunderbird\thunderbird.REG' />


Alternatively, you can use this jscript file to use full path names:

var WshShell = WScript.CreateObject("WScript.Shell");
var key;
var value;

key = "HKEY_CLASSES_ROOT\\mailto\\";
value = "URL:MailTo Protocol";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\mailto\\URL Protocol";
value = "";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\mailto\\defaultIcon\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\mailto\\shell\\open\\command\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -compose %1";
WshShell.RegWrite(key, value, "REG_SZ");


key = "HKEY_CLASSES_ROOT\\news\\";
value = "URL:News Protocol";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\news\\URL Protocol";
value = "";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\news\\defaultIcon\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\news\\shell\\open\\command\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -mail %1";
WshShell.RegWrite(key, value, "REG_SZ");


key = "HKEY_CLASSES_ROOT\\nntp\\";
value = "URL:NNTP Protocol";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\nntp\\URL Protocol";
value = "";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\nntp\\defaultIcon\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\nntp\\shell\\open\\command\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -mail %1";
WshShell.RegWrite(key, value, "REG_SZ");


key = "HKEY_CLASSES_ROOT\\snews\\";
value = "URL:Snews Protocol";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\snews\\URL Protocol";
value = "";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\snews\\defaultIcon\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\Thunderbird.exe,0";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_CLASSES_ROOT\\snews\\shell\\open\\command\\";
value = WshShell.ExpandEnvironmentStrings("%ProgramFiles%") + "\\Mozilla Thunderbird\\Thunderbird.exe -mail %1";
WshShell.RegWrite(key, value, "REG_SZ");


key = "HKEY_CURRENT_USER\\Software\\Clients\\Mail\\";
value = "Mozilla Thunderbird";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Clients\\Mail\\";
value = "Mozilla Thunderbird";
WshShell.RegWrite(key, value, "REG_SZ");

key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Clients\\News\\";
value = "Mozilla Thunderbird";
WshShell.RegWrite(key, value, "REG_SZ");


And then add this to your XML package definition:

  <install cmd='cscript %SOFTWARE%\Thunderbird\setdefault.js' />
  <upgrade cmd='cscript %SOFTWARE%\Thunderbird\setdefault.js' />


Silent installation of Thunderbird extensions

To silently install Mozilla Thunderbird extensions, do the following:

  • download the extension
  • go to "%PROGRAMFILES%\Mozilla Thunderbird\extensions\" and see what folders you have there
  • install the extension into Thunderbird manually
    • It is best to do this using Tools -> Extensions -> Install from within Thunderbird. Then you can find the additional folder containing your extension in "%PROGRAMFILES%\Mozilla Thunderbird\extensions\".
    • Alternatively, you can use any unzip program to look inside the XPI file (which is just a zip file with the extension changed to XPI). However, you will not know which folder the XPI will extract to unless you look inside the install.rdf and look for id.
  • copy the new folder to the server
  • the silent installer will look like this:
<package
     id="thunderbird-quicktext"
     name="Quicktext extension"
     revision="1"
     reboot="false"
     priority="0">
 
    <check type="file" condition="exists" path="%PROGRAMFILES%\Mozilla Thunderbird\extensions\{8845E3B3-E8FB-40E2-95E9-EC40294818C4}\install.rdf" />
 
    <install cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\thunderbird\extensions\quicktext\{8845E3B3-E8FB-40E2-95E9-EC40294818C4}" "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{8845E3B3-E8FB-40E2-95E9-EC40294818C4}"' />
 
    <upgrade cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\thunderbird\extensions\quicktext\{8845E3B3-E8FB-40E2-95E9-EC40294818C4}" "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{8845E3B3-E8FB-40E2-95E9-EC40294818C4}"' />
 
    <remove cmd='cmd /C rmdir /S /Q "%PROGRAMFILES%\Mozilla Thunderbird\extensions\{8845E3B3-E8FB-40E2-95E9-EC40294818C4}"' />
</package>


  • Basically, it means you have to copy the folder named similar to {8845E3B3-E8FB-40E2-95E9-EC40294818C4} to your "%PROGRAMFILES%\Mozilla Thunderbird\extensions" folder
  • when Mozilla Thunderbird is next started, a new extension is detected automatically - you can verify this in Thunderbird using Tools -> Extensions


Silent installation of dictionaries (spell-checking)

Version 1.5

Mozilla Thunderbird keeps its (MySpell) dictionaries in %PROGRAMFILES%\Mozilla Thunderbird\components\myspell\.

By default, it only has an English dictionary (for licensing reasons).

Installing a new dictionary is simple - just copy the dictionary files for a given language to that folder.

Installation instructions for a German dictionary

  • Download a German dictionary from http://www.thunderbird-mail.de/hilfe/dokumentation1.5/allg_rechtschreibung.php
  • The file is a .xpi file (a renamed .zip file). Uncompress it using any unzipping program. Inside you'll find .aff and .dic files - these are the core dictionary files. (There is also a .txt file (some info), and a .js file (the installer, used if you install the dictionary using Thunderbird))
  • Copy the core dictionary files into %PROGRAMFILES%\Mozilla Thunderbird\components\myspell\.
  • The XML which installs the German dictionary for Thunderbird should look like this:
<package
     id="thunderbird-woerterbuch"
     name="Woerterbuch fuer Thunderbird"
     revision="1"
     reboot="false"
     priority="0">
 
     <check type="file" condition="exists" path="%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\Deutsch - neue Rechtschreibung.aff" />
     <check type="file" condition="exists" path="%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\Deutsch - neue Rechtschreibung.dic" />
     <check type="file" condition="exists" path="%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\Deutsch - neue Rechtschreibung.txt" />
 
     <install cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\thunderbird\extensions\woerterbuch\*" "%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\"' />
 
     <upgrade cmd='cmd /C xcopy /Q /I /E /Y "%SOFTWARE%\thunderbird\extensions\woerterbuch\*" "%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\"' />
 
     <remove cmd='cmd /C del "%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\Deutsch - neue Rechtschreibung.*"' />
</package>

Version 2.0 Download the Thunderbird Dictionary (download the right one, i.e. the german dictionary from the official webpage won't work) and install it like this:

thunderbird.exe -install-global-extension "x:\software\deutsches_w_ouml_rterbuch-1.0.1-fx+zm+tb.xpi"


Disable auto update

http://sourceforge.net/mailarchive/forum.php?thread_name=45E2C361.103%40kh-berlin.de&forum_name=wpkg-users

Note This won't work anymore (at least in 2.0.0.6), seems like a bug. It is already files as a bug here [1]. Keep yourself updated on the bug page.


Removing access to Outlook Express

If you want to remove access to OE, see Outlook Express.


Using thunderbird autoconfig

See: [[2]]

Create a customized text file named thunderbird.cfg and put it in the thunderbird executable folder:

'%programfiles%\mozilla thunderbird\thunderbird.cfg'

Edit %programfiles%\mozilla thunderbird\greprefs\all.js addding the following values:

pref("general.config.obscure_value", 0);
pref("general.config.filename", "thunderbird.cfg");

Note: Byteshifting does not seem to be required with versions 1.5.* or 2.0.*

You can add functionality to the prefs by including javascript within the file.

Example thunderbird.cfg with automatically assigned values from ldap.

//put everything in a try/catch
try {
 
// 1) env variables
if(getenv("USER") != "") {
   // *NIX settings
   var env_user    = getenv("USER");
   var env_home    = getenv("HOME");
 } else {
   // Windows settings
   var env_user    = getenv("USERNAME");
   var env_home    = getenv("HOMEPATH");
 }
  var env_mozdebug= getenv("MOZILLA_DEBUG");
 
 
// 2) set default general preferences

//Account
defaultPref("mail.identity.id1.draft_folder", "imap://" + env_user + "@imap.url/Drafts");
defaultPref("mail.identity.id1.fcc_folder", "imap://" + env_user + "@imap.url/Sent");

//Junk
defaultPref("mail.server.server2.spamActionTargetAccount", "imap://" + env_user + "@imap.url");
defaultPref("mail.server.server2.spamActionTargetFolder", "mailbox://" + env_user + "@imap.url/Junk");

//SMTP
defaultPref("mail.identity.id1.stationery_folder", "imap://" + env_user + "@imap.url/Templates");

 
//SMTP general
lockPref("mail.smtpserver.smtp1.hostname", "smtp.url");
lockPref("mail.smtpserver.smtp1.port", 25);

 
//General
defaultPref("network.proxy.autoconfig_url", "http://proxy.url/proxy.pac");
defaultPref("network.proxy.type", 2);

 
/* 3) define here (because if set after "4)" below it doesn't work !) processLDAPValues which is eventually called by getLDAPAttributes() just below,
 check getLDAPAttributes() code from $MOZILLA_HOME/defaults/autoconfig/prefcalls.js to see the inside call to "user defined" processLDAPValues
*/
function processLDAPValues (values) {
 if(values) {
      // set the global var with the values returned from the LDAP query
      ldap_values = values;
    var uid = getLDAPValue ( values ,"uid" );
    var cn = getLDAPValue ( values ,"cn" );
    var mail = getLDAPValue ( values ,"mail" );
    var URL =  getLDAPValue ( values ,"labeledURI" );
 
// Those ldap variables are only available is this processLDAPValues context !
// so we set the preferences that need them here .
defaultPref("mail.identity.id1.useremail", mail);
defaultPref("mail.server.server2.name", mail );
defaultPref("mail.identity.id1.fullName", cn );
//Debug with popup error messages doesn't work anymore :-( !!
var env_mozdebug= getenv("MOZILLA_DEBUG");
if (env_mozdebug) {displayError("NO ERROR , just a debug, cn =" + cn + " and mail = " + mail ); }
    }
  }
// 4) Call Ldap servers to get Ldap Attributes (mail & cn) , this will finally call processLDAPValues , "3)" just above.
  getLDAPAttributes("ldap.url","ou=people,o=Comapny","uid=" + env_user,"uid,cn,mail,labeledURI");
 
// Close the try, and call the catch()
} catch(e) {
  displayError("lockedPref", e);
}