gecko-dev/mail/installer/windows/mail.jst
2005-04-19 20:33:45 +00:00

961 lines
47 KiB
Plaintext

function registerProgramFolderKey(winreg, fFolderPath)
{
var subkey;
var err;
/* set the Program Folder Path in the Mozilla key in the Windows Registry */
winreg.createKey("SOFTWARE\\$CompanyName$","");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "CurrentVersion", "$UserAgent$");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$";
winreg.createKey(subkey,"");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "Program Folder Path", fFolderPath);
}
function createShortcuts()
{
var subkey;
var valname;
var szStartMenuPrograms;
var szStartMenu;
var szFolderDesktop;
var szFolderQuickLaunch;
var szFolderSendTo;
var szFolderAppData;
var szStartupFolder;
var winreg;
var fWindows;
var fTemp;
var fProgram;
var fDefShortcuts;
var fileExe;
var fileReadme;
var fileLicense;
var scExeDesc;
var scReadmeDesc;
var scLicenseDesc;
var scProfileDesc;
var scProfileDescParam;
var scFolderName;
var fFolderDesktop;
var fFolderPath;
var fFolderPathStr;
var fFolderQuickLaunch;
var is_winnt;
var szCurrentVersion;
var folderQuickLaunchExists;
winreg = getWinRegistry();
fWindows = getFolder("Windows");
fProgram = getFolder("Program");
fDefShortcuts = getFolder("Program","defaults/shortcuts");
fTemp = fProgram + "$MainExeFile$";
fileExe = getFolder("file:///", fTemp);
fileReadme = getFolder("file:///", fProgram + "readme.txt");
fileLicense = getFolder("file:///", fProgram + "license.txt");
scExeDesc = "$ProductName$";
scReadmeDesc = "Readme";
scLicenseDesc = "License";
scProfileDesc = "Profile Manager";
scProfileDescParam = "-ProfileManager";
scSafeModeDesc = "$ProductName$ (No Extensions)";
scSafeModeDescParam = "-no-extensions";
scFolderName = "$ProductName$";
fileMailIcon = getFolder("Chrome", "icons/default/messengerWindow.ico");
if(winreg != null)
{
/* determine if the script is running under NT or not */
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
subkey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
szCurrentVersion = winreg.getValueString(subkey, "CurrentVersion");
logComment("szCurrentVersion: " + szCurrentVersion);
if((szCurrentVersion == "") || (szCurrentVersion == null))
{
is_winnt = false;
}
else
{
is_winnt = true;
}
logComment("is_winnt value: " + is_winnt);
logComment("restrictedAccess value: " + restrictedAccess);
if(!is_winnt || restrictedAccess)
{
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
szStartMenuPrograms = winreg.getValueString(subkey, "Programs");
szStartMenu = winreg.getValueString(subkey, "Start Menu");
szFolderDesktop = winreg.getValueString(subkey, "Desktop");
szStartupFolder = winreg.getValueString(subkey, "Startup");
}
else
{
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
szStartMenuPrograms = winreg.getValueString(subkey, "Common Programs");
szStartMenu = winreg.getValueString(subkey, "Common Start Menu");
szFolderDesktop = winreg.getValueString(subkey, "Common Desktop");
szStartupFolder = winreg.getValueString(subkey, "Common Startup");
}
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
szFolderSendTo = winreg.getValueString(subkey, "SendTo");
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
szFolderAppData = winreg.getValueString(subkey, "AppData");
// locate the Quick Launch folder
szFolderQuickLaunch = szFolderAppData + "\\Microsoft\\Internet Explorer\\Quick Launch";
fFolderQuickLaunch = getFolder("file:///", szFolderQuickLaunch);
folderQuickLaunchExists = File.isDirectory(fFolderQuickLaunch);
if(!folderQuickLaunchExists)
{
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\GrpConv\\MapGroups";
szFolderQuickLaunch = winreg.getValueString(subkey, "Quick Launch");
folderQuickLaunchExists = File.isDirectory(fFolderPath);
if(folderQuickLaunchExists)
fFolderQuickLaunch = getFolder("file:///", szFolderQuickLaunch);
}
logComment("folderQuickLaunchExists: " + folderQuickLaunchExists);
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
fFolderPathStr = winreg.getValueString(subkey, "Program Folder Path");
if((fFolderPathStr == "") || (fFolderPathStr == null))
{
fTemp = szStartMenuPrograms + "\\" + scFolderName;
fFolderPath = getFolder("file:///", fTemp);
}
else
{
/* convert the path string to a path folder object */
fFolderPath = getFolder("file:///", fFolderPathStr);
}
/* convert the path string to a path folder object */
fFolderDesktop = getFolder("file:///", szFolderDesktop);
logComment("Folder StartMenuPrograms: " + szStartMenuPrograms);
logComment("Folder StartMenu : " + szStartMenu);
logComment("Folder FolderDesktop : " + szFolderDesktop);
logComment("Folder FolderSendTo : " + szFolderSendTo);
logComment("Folder FolderQuickLaunch: " + szFolderQuickLaunch);
logComment("fileExe : " + fileExe);
logComment("fFolderPath : " + fFolderPath);
logComment("scExeDesc : " + scExeDesc);
logComment("fProgram : " + fProgram);
/* explicitly create the fFolderPath even though the windowsShortcut function creates the folder.
* This is so that the folder creation gets logged for uninstall to remove it. */
if(winreg.getValueNumber(subkey, "Create Start Menu Shortcut") != 0 && !File.exists(fFolderPath))
File.dirCreate(fFolderPath);
if(winreg.getValueNumber(subkey, "Create Start Menu Shortcut") != 0 && !File.exists(fDefShortcuts))
File.dirCreate(fDefShortcuts);
/* create the shortcuts */
// Create the Shortcuts
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
if (winreg.getValueNumber(subkey, "Create Desktop Shortcut") != 0)
File.windowsShortcut(fileExe, fFolderDesktop, scExeDesc, fProgram, "", fileExe, 0);
if (winreg.getValueNumber(subkey, "Create Start Menu Shortcut") != 0) {
File.windowsShortcut(fileExe, fFolderPath, scExeDesc, fProgram, "", fileExe, 0);
File.windowsShortcut(fileExe, fFolderPath, scProfileDesc, fProgram, scProfileDescParam, fileExe, 0);
File.windowsShortcut(fileExe, fFolderPath, scSafeModeDesc, fProgram, scSafeModeDescParam, fileExe, 0);
File.windowsShortcut(fileReadme, fFolderPath, scReadmeDesc, fProgram, "", fileReadme, 0);
File.windowsShortcut(fileLicense, fFolderPath, scLicenseDesc, fProgram, "", fileLicense, 0);
}
File.windowsShortcut(fileExe, fDefShortcuts, scExeDesc, fProgram, "", fileExe, 0);
File.windowsShortcut(fileExe, fDefShortcuts, scSafeModeDesc, fProgram, scSafeModeDescParam, fileExe, 0);
// create shortcut in the Quick Launch folder
if (winreg.getValueNumber(subkey, "Create Quick Launch Shortcut") != 0 && folderQuickLaunchExists)
File.windowsShortcut(fileExe, fFolderQuickLaunch, scExeDesc, fProgram, "", fileExe, 0);
// Clean up after ourselves
winreg.deleteValue(subkey, "Create Desktop Shortcut");
winreg.deleteValue(subkey, "Create Quick Launch Shortcut");
winreg.deleteValue(subkey, "Create Start Menu Shortcut");
if(!restrictedAccess)
{
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
registerProgramFolderKey(winreg, fFolderPath);
}
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
registerProgramFolderKey(winreg, fFolderPath);
// Register as a windows XP mail application
if( IsWinnt() )
{
subkey = "Software\\Clients\\Mail\\$ProductNameInternal$";
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
winreg.createKey(subkey,"");
winreg.createKey(subkey + "\\DefaultIcon", "");
winreg.createKey(subkey + "\\shell", "");
winreg.createKey(subkey + "\\shell\\open", "");
winreg.createKey(subkey + "\\shell\\open\\command", "");
winreg.createKey(subkey + "\\InstallInfo","");
winreg.setValueString(subkey, "", "$ProductName$");
// path does not need to be quoted per MS doc
data = fProgram + "chrome\\icons\\default\\messengerWindow.ico,0";
winreg.setValueString(subkey + "\\DefaultIcon", "", data);
data = "\"" + fProgram + "$MainExeFile$\"";
winreg.setValueString(subkey + "\\shell\\open\\command", "", data);
data = "\"" + fProgram + "uninstall\\$UninstallFile$\" /ua \"$UserAgent$\" /hs";
winreg.setValueString(subkey + "\\InstallInfo", "HideIconsCommand", data);
// set this value to 0 because we're not creating the mail shortcuts yet.
winreg.setValueNumber(subkey + "\\InstallInfo", "IconsVisible", 0);
data = "\"" + fProgram + "$MainExeFile$\" -silent -nosplash -setDefaultMail";
winreg.setValueString(subkey + "\\InstallInfo", "ReinstallCommand", data);
data = "\"" + fProgram + "uninstall\\$UninstallFile$\" /ua \"$UserAgent$\" /ss mail";
winreg.setValueString(subkey + "\\InstallInfo", "ShowIconsCommand", data);
}
}
else
{
logComment("winreg is null");
}
}
function updateMapi()
{
var winreg;
var szValue;
var szMapiBackupDll;
var szDefaultMailClient;
var programMozMapi32File;
var mainExePath;
var sfpProgramMozMapi32File;
var sfpMainExePath;
var winsysMapi32File;
var mapiProxyFile;
var subkey;
var oldVersionIsDefautClient = false;
var mailDefaultDescription = "$ProductName$";
winreg = getWinRegistry();
if(winreg != null)
{
mainExePath = getFolder("Program", "$MainExeFile$");
programMozMapi32File = getFolder("Program", "mozMapi32.dll");
winsysMapi32File = getFolder("Win System", "Mapi32.dll");
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
// If Mapi_backup_dll *and* the default var of
// HKEY_LOCAL_MACHINE\Software\Clients\Mail is set, then install
// mozMapi32.dll to the windows system dir as Mapi32.dll.
szMapiBackupDll = winreg.getValueString("SOFTWARE\\Mozilla\\Desktop", "Mapi_backup_dll");
szDefaultMailClient = winreg.getValueString("SOFTWARE\\Clients\\Mail", "");
logComment("szMapiBackupDll: " + szMapiBackupDll);
logComment("szDefaultMailClient: " + szDefaultMailClient);
if((szMapiBackupDll != null) && (szMapiBackupDll != "") &&
(szDefaultMailClient != null) && (szDefaultMailClient == "$ProductName$"))
{
// We do not want to log this file to be uninstalled because the
// uninstaller already has a special way to deal with restoring the
// appropriate previous Mapi32.dll.
addFile("",
"$Version$",
"bin/mozMapi32.dll", // file name in jar to extract
getFolder("Win System"), // Where to put this file (Returned from getFolder)
"Mapi32.dll", // new name when installed
DO_NOT_UNINSTALL);
}
sfpProgramMozMapi32File = File.windowsGetShortName(programMozMapi32File);
sfpMainExePath = File.windowsGetShortName(mainExePath);
subkey = "SOFTWARE\\Clients\\Mail\\$ProductName$";
winreg.createKey(subkey, "");
winreg.setValueString(subkey, "", mailDefaultDescription);
winreg.setValueString(subkey, "DLLPath", sfpProgramMozMapi32File);
winreg.createKey(subkey + "\\DefaultIcon", "");
winreg.setValueString(subkey + "\\DefaultIcon", "", sfpMainExePath + ",0");
// Register mailto protocol handler
winreg.createKey(subkey + "\\protocols", "");
winreg.createKey(subkey + "\\protocols\\mailto", "");
winreg.setValueString(subkey + "\\protocols\\mailto", "", "URL:MailTo Protocol");
winreg.setValueString(subkey + "\\protocols\\mailto", "URL Protocol", "");
winreg.createKey(subkey + "\\protocols\\mailto\\shell", "");
winreg.createKey(subkey + "\\protocols\\mailto\\shell\\open", "");
winreg.createKey(subkey + "\\protocols\\mailto\\shell\\open\\command", "");
winreg.setValueString(subkey + "\\protocols\\mailto\\shell\\open\\command", "", sfpMainExePath + " -compose \"%1\"");
winreg.createKey(subkey + "\\protocols\\mailto\\DefaultIcon", "");
winreg.setValueString(subkey + "\\protocols\\mailto\\DefaultIcon", sfpMainExePath + ",0");
// register shell open command for Mozilla Thunderbird product key under \Mail
winreg.createKey(subkey + "\\shell", "");
winreg.createKey(subkey + "\\shell\\open", "");
winreg.createKey(subkey + "\\shell\\open\\command", "");
winreg.setValueString(subkey + "\\shell\\open\\command", "", sfpMainExePath);
winreg.createKey(subkey + "\\shell\\properties", "");
winreg.setValueString(subkey + "\\shell\\properties", "", "Thunderbird &Options");
winreg.createKey(subkey + "\\shell\\properties\\command", "");
winreg.setValueString(subkey + "\\shell\\properties\\command", "", sfpMainExePath + " -options");
// Register Thunderbird as a News Reader
subkey = "SOFTWARE\\Clients\\News\\$ProductName$";
winreg.createKey(subkey, "");
winreg.setValueString(subkey, "", mailDefaultDescription);
winreg.setValueString(subkey, "DLLPath", sfpProgramMozMapi32File);
winreg.createKey(subkey + "\\DefaultIcon", "");
winreg.setValueString(subkey + "\\DefaultIcon", "", sfpMainExePath + ",0");
// register shell open command for Mozilla Thunderbird product key under \News
winreg.createKey(subkey + "\\shell", "");
winreg.createKey(subkey + "\\shell\\open", "");
winreg.createKey(subkey + "\\shell\\open\\command", "");
winreg.setValueString(subkey + "\\shell\\open\\command", "", sfpMainExePath);
// Register News protocol handlers (news, snews, nntp)
winreg.createKey(subkey + "\\protocols", "");
winreg.createKey(subkey + "\\protocols\\news", "");
winreg.setValueString(subkey + "\\protocols\\news", "", "URL:News Protocol");
winreg.setValueString(subkey + "\\protocols\\news", "URL Protocol", "");
winreg.createKey(subkey + "\\protocols\\news\\shell", "");
winreg.createKey(subkey + "\\protocols\\news\\shell\\open", "");
winreg.createKey(subkey + "\\protocols\\news\\shell\\open\\command", "");
winreg.setValueString(subkey + "\\protocols\\news\\shell\\open\\command", "", sfpMainExePath + " -mail \"%1\"");
winreg.createKey(subkey + "\\protocols\\news\\DefaultIcon", "");
winreg.setValueString(subkey + "\\protocols\\news\\DefaultIcon", sfpMainExePath + ",0");
winreg.createKey(subkey + "\\protocols\\nntp", "");
winreg.setValueString(subkey + "\\protocols\\nntp", "", "URL:NNTP Protocol");
winreg.setValueString(subkey + "\\protocols\\nntp", "URL Protocol", "");
winreg.createKey(subkey + "\\protocols\\nntp\\shell", "");
winreg.createKey(subkey + "\\protocols\\nntp\\shell\\open", "");
winreg.createKey(subkey + "\\protocols\\nntp\\shell\\open\\command", "");
winreg.setValueString(subkey + "\\protocols\\nntp\\shell\\open\\command", "", sfpMainExePath + " -mail \"%1\"");
winreg.createKey(subkey + "\\protocols\\nntp\\DefaultIcon", "");
winreg.setValueString(subkey + "\\protocols\\nntp\\DefaultIcon", sfpMainExePath + ",0");
winreg.createKey(subkey + "\\protocols\\snews", "");
winreg.setValueString(subkey + "\\protocols\\snews", "", "URL:Snews Protocol");
winreg.setValueString(subkey + "\\protocols\\snews", "URL Protocol", "");
winreg.createKey(subkey + "\\protocols\\snews\\shell", "");
winreg.createKey(subkey + "\\protocols\\snews\\shell\\open", "");
winreg.createKey(subkey + "\\protocols\\snews\\shell\\open\\command", "");
winreg.setValueString(subkey + "\\protocols\\snews\\shell\\open\\command", "", sfpMainExePath + " -mail \"%1\"");
winreg.createKey(subkey + "\\protocols\\snews\\DefaultIcon", "");
winreg.setValueString(subkey + "\\protocols\\snews\\DefaultIcon", sfpMainExePath + ",0");
subkey = "SOFTWARE\\$ProductName$\\Desktop";
szCurrentVersion = winreg.getValueString(subkey, "CurrentVersion");
logComment("szCurrentVersion: " + szCurrentVersion);
// Register MapiProxy.dll
mapiProxyFile = getFolder("Program", "MapiProxy.dll");
err = File.windowsRegisterServer(mapiProxyFile);
logComment("File.windowsRegisterServer(" + mapiProxyFile + ") returned: " + err);
// Ok, we've registered ourselves as a Mail and News client. We've registered all of the protocols we support.
// If the user was using Thunderbird as their default client but had Thunderbird installed in a different directory
// than what the installer is installing into, then we end up with the wrong version of Thunderbird as the default app.
// to work around this, we are going to test what the current default mail app is. If it contains Thunderbird and it is not
// pointing to us, then write into the registry the values necessary for Thunderbird to re-ask the user about being the default
// mail app the next time the newly installed version comes up. This case happens a lot because we've had so many releases without
// an installer that everyone has ended up installing bits into their own locations.
if (szDefaultMailClient == "$ProductName$")
{
// check to see if the location of the default mail protocol handler matches the location we just wrote to...
// if it does not, then
var szNewMailtoProtocolHandler = sfpMainExePath + " -compose \"%1\"";
var szOldMailtoProtocolHandler = winreg.getValueString("Software\\Classes\\mailto\\shell\\open\\command", "");
if ((szOldMailtoProtocolHandler != null) && (szNewMailtoProtocolHandler != szOldMailtoProtocolHandler))
oldVersionIsDefautClient = true;
logComment("oldVersionIsDefautClient: " + oldVersionIsDefautClient);
}
// now that we have registred ourselves as a mail and news client, make some notations in our scratch pad
// so the client doesn't try to re-register the same keys all over again.
subkey = "SOFTWARE\\$ProductName$";
winreg.createKey(subkey, "");
winreg.createKey(subkey + "\\Desktop", "");
winreg.setValueString(subkey + "\\Desktop", "registeredAsMailApp", "1");
winreg.setValueString(subkey + "\\Desktop", "registeredAsNewsApp", "1");
if (oldVersionIsDefautClient)
{
// ok here's a scenario where a different version of thunderbird is the default mail client in a different directory
// from where the installer is putting it. So clear out our scratchpad registry entries to make Thunderbird ask the user
// if it should be the default client again.
logComment("Resetting showMapiDialog and defaultMailHasBeenSet");
winreg.setValueString(subkey + "\\Desktop", "showMapiDialog", "1");
winreg.setValueString(subkey + "\\Desktop", "defaultMailHasBeenSet", "0");
}
}
}
function updateWinIni()
{
var fWinIni = getWinProfile(getFolder("Windows"), "win.ini");
if(fWinIni != null)
{
fWinIni.writeString("Mail", "MAPI", "1");
fWinIni.writeString("Mail", "MAPIX", "1");
}
}
function IsWinnt()
{
/* Determines if the script is running under NT or not.
*
*/
var winreg = getWinRegistry();
var subkey;
var szCurrentVersion;
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
subkey = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
szCurrentVersion = winreg.getValueString(subkey, "CurrentVersion");
logComment("szCurrentVersion: " + szCurrentVersion);
return szCurrentVersion != "";
}
function registerMainKeys(winreg)
{
var subkey; //the name of the subkey you are poking around in
var data;
var err;
winreg.createKey("SOFTWARE\\$CompanyName$","");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "CurrentVersion", "$UserAgent$");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$";
winreg.createKey(subkey,"");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "Install Directory", fProgram);
// now set Mozilla\Mozilla Thunderbird\bin\PathToExe so 3rd party vendors can find our app
subkey = "SOFTWARE\\Mozilla\\$ProductName$ $UserAgentShort$\\bin";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "PathToExe", fProgram + "$MainExeFile$");
subkey = "SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main";
err = winreg.setValueString(subkey, "PathToExe", fProgram + "$MainExeFile$");
}
function updateWinReg()
{
//Notes:
// can't use a double backslash before subkey - Windows already puts it in.
// subkeys have to exist before values can be put in.
var winreg = getWinRegistry();
var subkey; //the name of the subkey you are poking around in
var err;
var ikwDefined;
if(winreg != null)
{
/* This will check to see if the user has restricted access or not.
* It checks to see if HKEY_LOCALMACHINE\SOFTWARE is writable. If
* it is, then access is not restricted. This is only used to
* determine which Desktop, Programs, and Start Menu folders
* are to used: common or per user
*/
restrictedAccess = false;
ikwDefined = typeof(winreg.isKeyWritable);
logComment("winreg.isKeyWritable(): " + ikwDefined);
if(ikwDefined == "function")
{
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
if(!winreg.isKeyWritable("SOFTWARE"))
restrictedAccess = true;
}
logComment("restrictedAccess value: " + restrictedAccess);
if(!restrictedAccess)
{
winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
registerMainKeys(winreg);
// set the App Paths key here
subkey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\$MainExeFile$";
winreg.createKey(subkey,"");
err = winreg.setValueString(subkey, "", fProgram + "$MainExeFile$");
err = winreg.setValueString(subkey, "Path", fProgram);
}
winreg.setRootKey(winreg.HKEY_CURRENT_USER);
registerMainKeys(winreg);
}
}
function upgradeCleanup()
{
// Thunderbird used to not be a static build, so we need to clean up all of the stale dlls
// from the non static build..
deleteThisFile("Components", "xpti.dat");
deleteThisFile("Components", "compreg.dat");
deleteThisFile("Components", "accessibility.dll");
deleteThisFile("Components", "appcomps.dll");
deleteThisFile("Components", "appshell.dll");
deleteThisFile("Components", "caps.dll");
deleteThisFile("Components", "chrome.dll");
deleteThisFile("Components", "composer.dll");
deleteThisFile("Components", "docshell.dll");
deleteThisFile("Components", "editor.dll");
deleteThisFile("Components", "embedcomponents.dll");
deleteThisFile("Components", "gkgfxwin.dll");
deleteThisFile("Components", "gklayout.dll");
deleteThisFile("Components", "gkparser.dll");
deleteThisFile("Components", "gkwidget.dll");
deleteThisFile("Components", "i18n.dll");
deleteThisFile("Components", "imgicon.dll");
deleteThisFile("Components", "imglib2.dll");
deleteThisFile("Components", "import.dll");
deleteThisFile("Components", "mail.dll");
deleteThisFile("Components", "mork.dll");
deleteThisFile("Components", "mozfind.dll");
deleteThisFile("Components", "mozldap.dll");
deleteThisFile("Components", "msgMapi.dll");
deleteThisFile("Components", "msgsmime.dll");
deleteThisFile("Components", "necko.dll");
deleteThisFile("Components", "necko2.dll");
deleteThisFile("Components", "nsprefm.dll");
deleteThisFile("Components", "pipboot.dll");
deleteThisFile("Components", "pipnss.dll");
deleteThisFile("Components", "pippki.dll");
deleteThisFile("Components", "profile.dll");
deleteThisFile("Components", "profilemigration.dll");
deleteThisFile("Components", "rdf.dll");
deleteThisFile("Components", "txmgr.dll");
deleteThisFile("Components", "uconv.dll");
deleteThisFile("Components", "wallet.dll");
deleteThisFile("Components", "webbrwsr.dll");
deleteThisFile("Components", "wlltvwrs.dll");
deleteThisFile("Components", "xmlextras.dll");
deleteThisFile("Components", "xpc3250.dll");
deleteThisFile("Components", "xpcom_compat_c.dll");
deleteThisFile("Components", "xppref32.dll");
// xpt files
deleteThisFile("Components", "accessibility-msaa.xpt");
deleteThisFile("Components", "accessibility.xpt");
deleteThisFile("Components", "addrbook.xpt");
deleteThisFile("Components", "alerts.xpt");
deleteThisFile("Components", "appshell.xpt");
deleteThisFile("Components", "autocomplete.xpt");
deleteThisFile("Components", "caps.xpt");
deleteThisFile("Components", "chardet.xpt");
deleteThisFile("Components", "commandhandler.xpt");
deleteThisFile("Components", "composer.xpt");
deleteThisFile("Components", "content_base.xpt");
deleteThisFile("Components", "content_html.xpt");
deleteThisFile("Components", "content_htmldoc.xpt");
deleteThisFile("Components", "content_xmldoc.xpt");
deleteThisFile("Components", "content_xslt.xpt");
deleteThisFile("Components", "docshell_base.xpt");
deleteThisFile("Components", "dom.xpt");
deleteThisFile("Components", "dom_base.xpt");
deleteThisFile("Components", "dom_core.xpt");
deleteThisFile("Components", "dom_css.xpt");
deleteThisFile("Components", "dom_events.xpt");
deleteThisFile("Components", "dom_html.xpt");
deleteThisFile("Components", "dom_range.xpt");
deleteThisFile("Components", "dom_stylesheets.xpt");
deleteThisFile("Components", "dom_traversal.xpt");
deleteThisFile("Components", "dom_views.xpt");
deleteThisFile("Components", "dom_xbl.xpt");
deleteThisFile("Components", "dom_xpath.xpt");
deleteThisFile("Components", "dom_xul.xpt");
deleteThisFile("Components", "downloadmanager.xpt");
deleteThisFile("Components", "editor.xpt");
deleteThisFile("Components", "embed_base.xpt");
deleteThisFile("Components", "exthandler.xpt");
deleteThisFile("Components", "find.xpt");
deleteThisFile("Components", "gfx.xpt");
deleteThisFile("Components", "helperAppDlg.xpt");
deleteThisFile("Components", "htmlparser.xpt");
deleteThisFile("Components", "imgicon.xpt");
deleteThisFile("Components", "imglib2.xpt");
deleteThisFile("Components", "impComm4xMail.xpt");
deleteThisFile("Components", "import.xpt");
deleteThisFile("Components", "intl.xpt");
deleteThisFile("Components", "jar.xpt");
deleteThisFile("Components", "jsdservice.xpt");
deleteThisFile("Components", "jsurl.xpt");
deleteThisFile("Components", "layout_base.xpt");
deleteThisFile("Components", "layout_printing.xpt");
deleteThisFile("Components", "layout_xul.xpt");
deleteThisFile("Components", "layout_xul_tree.xpt");
deleteThisFile("Components", "locale.xpt");
deleteThisFile("Components", "lwbrk.xpt");
deleteThisFile("Components", "mailnews.xpt");
deleteThisFile("Components", "mailview.xpt");
deleteThisFile("Components", "mapihook.xpt");
deleteThisFile("Components", "mime.xpt");
deleteThisFile("Components", "mimetype.xpt");
deleteThisFile("Components", "mozbrwsr.xpt");
deleteThisFile("Components", "mozfind.xpt");
deleteThisFile("Components", "mozldap.xpt");
deleteThisFile("Components", "msgbase.xpt");
deleteThisFile("Components", "msgcompo.xpt");
deleteThisFile("Components", "msgdb.xpt");
deleteThisFile("Components", "msgimap.xpt");
deleteThisFile("Components", "msglocal.xpt");
deleteThisFile("Components", "msgnews.xpt");
deleteThisFile("Components", "msgsearch.xpt");
deleteThisFile("Components", "msgsmime.xpt");
deleteThisFile("Components", "necko.xpt");
deleteThisFile("Components", "necko_cache.xpt");
deleteThisFile("Components", "necko_cookie.xpt");
deleteThisFile("Components", "necko_data.xpt");
deleteThisFile("Components", "necko_dns.xpt");
deleteThisFile("Components", "necko_file.xpt");
deleteThisFile("Components", "necko_http.xpt");
deleteThisFile("Components", "necko_jar.xpt");
deleteThisFile("Components", "necko_res.xpt");
deleteThisFile("Components", "necko_strconv.xpt");
deleteThisFile("Components", "pipboot.xpt");
deleteThisFile("Components", "pipnss.xpt");
deleteThisFile("Components", "pippki.xpt");
deleteThisFile("Components", "pref.xpt");
deleteThisFile("Components", "prefmigr.xpt");
deleteThisFile("Components", "profile.xpt");
deleteThisFile("Components", "progressDlg.xpt");
deleteThisFile("Components", "proxyObject.xpt");
deleteThisFile("Components", "rdf.xpt");
deleteThisFile("Components", "signonviewer.xpt");
deleteThisFile("Components", "spellchecker.xpt");
deleteThisFile("Components", "txmgr.xpt");
deleteThisFile("Components", "txtsvc.xpt");
deleteThisFile("Components", "uconv.xpt");
deleteThisFile("Components", "unicharutil.xpt");
deleteThisFile("Components", "uriloader.xpt");
deleteThisFile("Components", "wallet.xpt");
deleteThisFile("Components", "webbrowserpersist.xpt");
deleteThisFile("Components", "webBrowser_core.xpt");
deleteThisFile("Components", "webshell_idls.xpt");
deleteThisFile("Components", "widget.xpt");
deleteThisFile("Components", "windowds.xpt");
deleteThisFile("Components", "windowwatcher.xpt");
deleteThisFile("Components", "winhooks.xpt");
deleteThisFile("Components", "xmlextras.xpt");
deleteThisFile("Components", "xpcom_base.xpt");
deleteThisFile("Components", "xpcom_components.xpt");
deleteThisFile("Components", "xpcom_ds.xpt");
deleteThisFile("Components", "xpcom_io.xpt");
deleteThisFile("Components", "xpcom_obsolete.xpt");
deleteThisFile("Components", "xpcom_thread.xpt");
deleteThisFile("Components", "xpcom_xpti.xpt");
deleteThisFile("Components", "xpconnect.xpt");
deleteThisFile("Components", "xpinstall.xpt");
deleteThisFile("Components", "xuldoc.xpt");
deleteThisFile("Components", "xultmpl.xpt");
// obsolete JS components
deleteThisFile("Components", "nsBackgroundUpdateService.js");
deleteThisFile("Chrome", "chrome.rdf");
deleteThisFile("Chrome", "en-US-mail.jar");
deleteThisFile("Program", "defaults/pref/all.js");
deleteThisFile("Program", "defaults/pref/security-prefs.js");
deleteThisFile("Program", "defaults/pref/winpref.js");
deleteThisFile("Program", "defaults/pref/xpinstall.js");
deleteThisFile("Program", "defaults/pref/thunderbird.js");
// Now clean up Uninstall entries that may be laying around in the
// registry for older versions of the software that we're overwriting/
// upgrading...
var wr = getWinRegistry();
wr.setRootKey(wr.HKEY_LOCAL_MACHINE);
var i = 0;
const uninstallKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
do {
var key = wr.enumKeys(uninstallKey, i++);
if (!key)
break;
key = uninstallKey + "\\" + key;
// For us to remove the entry from the ARP uninstall list, the install
// folder paths must *match* and the display version strings must *NOT
// MATCH* - i.e. we don't want to remove the entry we just created for
// this version.
var itemInstallFolder = wr.getValueString(key, "InstallLocation");
var thisInstallFolder = wr.getValueString("SOFTWARE\\$CompanyName$\\$ProductName$\\$UserAgent$\\Main",
"Install Directory");
var itemInstallFolderShortName = File.windowsGetShortName(getFolder("file:///", itemInstallFolder));
var thisInstallFolderShortName = File.windowsGetShortName(getFolder("file:///", thisInstallFolder));
var itemDisplayVersion = wr.getValueString(key, "DisplayVersion");
var thisDisplayVersion = "$UserAgent$";
// It is possible that a user might have installed several products into
// the same directory that have the same "DisplayVersion" (e.g. "1.0")...
// in this case we don't want to trash the Uninstall info for the others
// so we have to be sure to make sure Comment matches... we use Comment
// instead of DisplayName since DisplayName varies from version to version
// as it contains the version number, and this instance of javascript is
// crippled so as not to contain any useful string parsing.
var itemComment = wr.getValueString(key, "Comment");
var thisComment = "$ProductName$";
if ((itemComment == thisComment || itemComment == "Reclaim Your Inbox.") &&
itemInstallFolderShortName == thisInstallFolderShortName &&
thisDisplayVersion != itemDisplayVersion &&
wr.isKeyWritable(key)) {
wr.deleteKey(key);
logComment("Removing obsolete uninstall key with upgrade: " + key);
}
}
while (true);
}
// main
var srDest;
var err;
var err2;
var fProgram;
var fWindowsSystem;
var fileComponentRegStr;
var fileComponentReg;
var restrictedAccess;
var fileToRegister;
var args;
var gGreLocal = false;
args = new String(Install.arguments);
logComment("args: " + args);
// If -gGreLocal is passed in, then we need to *not* cleanup GRE files if they
// exist in the browser dir.
// The default is to delete any GRE files because we default GRE will be global.
if(args == "-greLocal")
gGreLocal = true;
srDest = $SpaceRequired$:bin;
err = initInstall("$ProductName$", "Thunderbird", "$Version$");
logComment("initInstall: " + err);
fProgram = getFolder("Program");
fWindowsSystem = getFolder("Win System");
logComment("fProgram: " + fProgram);
if(verifyDiskSpace(fProgram, srDest))
{
setPackageFolder(fProgram);
upgradeCleanup();
err = addDirectory("",
"$Version$",
"bin", // dir name in jar to extract
fProgram, // Where to put this file (Returned from GetFolder)
"", // subdir name to create relative to fProgram
true); // Force Flag
logComment("addDirectory() of Program returned: " + err);
// check return value
if( err == SUCCESS )
{
fileToRegister = getFolder(fProgram, "AccessibleMarshal.dll");
err2 = File.windowsRegisterServer(fileToRegister);
logComment("windowsRegisterServer() returned: " + err2);
updateWinReg(); // Finish registering above marshalling dll's
createShortcuts();
updateWinIni();
updateMapi();
// we don't want to fail on errors for the above two
resetError();
// register chrome
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome", "mail.jar"), "content/mozapps/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/autoconfig/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/necko/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/wallet/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/xbl-marquee/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/global/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/global-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/global-platform/");
// XXXben Stuff that will become obsolete
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/navigator/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/navigator-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/navigator-platform/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/communicator/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/communicator-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"),"content/communicator-platform/");
// register chrome
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/editor/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/editor-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/help/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/mozldap/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/messenger/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/messenger-smime/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/messenger-region/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/messenger-mdn/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/messenger-views/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/messenger-mapi/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/branding/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/communicator/downloadmanager/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/pippki/");
registerChrome(CONTENT | DELAYED_CHROME, getFolder("Chrome","mail.jar"), "content/pipnss/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","qute.jar"), "skin/classic/global/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","qute.jar"), "skin/classic/communicator/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","qute.jar"), "skin/classic/mozapps/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","qute.jar"), "skin/classic/navigator/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","qute.jar"), "skin/classic/editor/");
registerChrome(SKIN | DELAYED_CHROME, getFolder("Chrome","qute.jar"), "skin/classic/messenger/");
// Create the uninstall folder.
err = File.dirCreate(getFolder("Program", "uninstall"));
logComment("dirCreate() of Program/uninstall returned: " + err);
/* Log files that are created after the installer is done, so they can be uninstalled */
logComment("Installing: " + fProgram + ".autoreg");
logComment("Installing: " + fProgram + "Xpcs Registry.dat");
logComment("Installing: " + fProgram + "xpcom.log");
logComment("Create Folder: " + fProgram + "components");
logComment("Installing: " + fProgram + "components\\xpti.dat");
logComment("Installing: " + fProgram + "components\\xptitemp.dat");
logComment("Installing: " + fProgram + "components\\compreg.dat");
logComment("Create Folder: " + fProgram + "chrome");
logComment("Installing: " + fProgram + "chrome\\installed-chrome.txt");
logComment("Installing: " + fProgram + "chrome\\chrome.rdf");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\communicator");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\communicator\\content");
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\communicator\\content\\overlays.rdf");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\editor");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\editor\\content");
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\editor\\content\\overlays.rdf");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\messenger");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\messenger\\content");
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\messenger\\content\\overlays.rdf");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\cookie");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\cookie\\content");
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\cookie\\content\\overlays.rdf");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\navigator");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\navigator\\content");
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\navigator\\content\\overlays.rdf");
logComment("Create Folder: " + fProgram + "chrome\\overlayinfo\\navigator\\skin");
logComment("Installing: " + fProgram + "chrome\\overlayinfo\\navigator\\skin\\stylesheets.rdf");
logComment("Create Folder: " + fProgram + "uninstall");
// log comments for uninstalling the registry keys created by mail for setting
// itself up in WinXP's Start menu
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$ []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$ []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$ [DLLPath]");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\DefaultIcon []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\DefaultIcon []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols\\mailto []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols\\mailto []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols\\mailto\\DefaultIcon []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols\\mailto\\shell []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols\\mailto\\shell\\open []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols\\mailto\\shell\\open\\command []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\protocols\\mailto\\shell\\open\\command []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\shell []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\shell\\open []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\shell\\open\\command []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\$ProductName$\\shell\\open\\command []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$ []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$ []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$ [DLLPath]");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\DefaultIcon []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\DefaultIcon []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\news []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\news []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\news\\DefaultIcon []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\news\\shell []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\news\\shell\\open []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\news\\shell\\open\\command []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\news\\shell\\open\\command []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\snews []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\snews []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\snews\\DefaultIcon []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\snews\\shell []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\snews\\shell\\open []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\snews\\shell\\open\\command []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\snews\\shell\\open\\command []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\nntp []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\nntp []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\nntp\\DefaultIcon []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\nntp\\shell []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\nntp\\shell\\open []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\nntp\\shell\\open\\command []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\protocols\\nntp\\shell\\open\\command []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\shell []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\shell\\open []");
logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\shell\\open\\command []");
logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\News\\$ProductName$\\shell\\open\\command []");
err = getLastError();
if (err == SUCCESS)
{
err = performInstall();
logComment("performInstall() returned: " + err);
if (! ('buildID' in Install))
{
logComment("Running Pre-Mozilla 0.9.1");
initInstall("Post-install Cleanup Utility", "Mail/xpicleanup", "$Version$");
cleanupUtility = getFolder(fProgram, "xpicleanup.exe");
err = File.execute(cleanupUtility);
logComment("execute() returned: " + err);
err = performInstall();
}
}
else
cancelInstall(err);
}
else
cancelInstall(err);
}
else
cancelInstall(INSUFFICIENT_DISK_SPACE);
// end main