home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 January / 01_02.iso / software / netscape62win / mail.xpi / install.js
Text File  |  2001-10-22  |  21KB  |  596 lines

  1. // this function verifies disk space in kilobytes
  2. function verifyDiskSpace(dirPath, spaceRequired)
  3. {
  4.   var spaceAvailable;
  5.  
  6.   // Get the available disk space on the given path
  7.   spaceAvailable = fileGetDiskSpaceAvailable(dirPath);
  8.  
  9.   // Convert the available disk space into kilobytes
  10.   spaceAvailable = parseInt(spaceAvailable / 1024);
  11.  
  12.   // do the verification
  13.   if(spaceAvailable < spaceRequired)
  14.   {
  15.     logComment("Insufficient disk space: " + dirPath);
  16.     logComment("  required : " + spaceRequired + " K");
  17.     logComment("  available: " + spaceAvailable + " K");
  18.     return(false);
  19.   }
  20.  
  21.   return(true);
  22. }
  23.  
  24. // this function deletes a file if it exists
  25. function deleteThisFile(dirKey, file)
  26. {
  27.   var fFileToDelete;
  28.  
  29.   fFileToDelete = getFolder(dirKey, file);
  30.   logComment("File to delete: " + fFileToDelete);
  31.   if(File.isFile(fFileToDelete))
  32.   {
  33.     File.remove(fFileToDelete);
  34.     return(true);
  35.   }
  36.   else
  37.     return(false);
  38. }
  39.  
  40. // this function deletes a folder if it exists
  41. function deleteThisFolder(dirKey, folder, recursiveDelete)
  42. {
  43.   var fToDelete;
  44.  
  45.   if(typeof recursiveDelete == "undefined")
  46.     recursiveDelete = true;
  47.  
  48.   fToDelete = getFolder(dirKey, folder);
  49.   logComment("folder to delete: " + fToDelete);
  50.   if(File.isDirectory(fToDelete))
  51.   {
  52.     File.dirRemove(fToDelete, recursiveDelete);
  53.     return(true);
  54.   }
  55.   else
  56.     return(false);
  57. }
  58.  
  59. // OS type detection
  60. // which platform?
  61. function getPlatform()
  62. {
  63.   var platformStr;
  64.   var platformNode;
  65.  
  66.   if('platform' in Install)
  67.   {
  68.     platformStr = new String(Install.platform);
  69.  
  70.     if (!platformStr.search(/^Macintosh/))
  71.       platformNode = 'mac';
  72.     else if (!platformStr.search(/^Win/))
  73.       platformNode = 'win';
  74.     else
  75.       platformNode = 'unix';
  76.   }
  77.   else
  78.   {
  79.     var fOSMac  = getFolder("Mac System");
  80.     var fOSWin  = getFolder("Win System");
  81.  
  82.     logComment("fOSMac: "  + fOSMac);
  83.     logComment("fOSWin: "  + fOSWin);
  84.  
  85.     if(fOSMac != null)
  86.       platformNode = 'mac';
  87.     else if(fOSWin != null)
  88.       platformNode = 'win';
  89.     else
  90.       platformNode = 'unix';
  91.   }
  92.  
  93.   return platformNode;
  94. }
  95.  
  96. function updateWinReg4Ren8dot3() 
  97. {
  98.   var fProgram      = getFolder("Program");
  99.   var fTemp         = getFolder("Temporary");
  100.  
  101.   //Notes:
  102.   // can't use a double backslash before subkey - Windows already puts it in.            
  103.   // subkeys have to exist before values can be put in.
  104.   var subkey;  // the name of the subkey you are poking around in
  105.   var valname; // the name of the value you want to look at
  106.   var value;   // the data in the value you want to look at.
  107.   var winreg = getWinRegistry() ;
  108.  
  109.   if(winreg != null) 
  110.   {
  111.     // Here, we get the current version.
  112.     winreg.setRootKey(winreg.HKEY_CURRENT_USER) ;  // CURRENT_USER
  113.     subkey  = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce" ;
  114.  
  115.     winreg.createKey(subkey,"");
  116.     valname = "ren8dot3";
  117.     value   = fProgram + "ren8dot3.exe " + fTemp + "ren8dot3.ini";
  118.     err     = winreg.setValueString(subkey, valname, value);
  119.   }
  120. }
  121.  
  122. function prepareRen8dot3(listLongFilePaths)
  123. {
  124.   var fTemp                 = getFolder("Temporary");
  125.   var fProgram              = getFolder("Program");
  126.   var fRen8dot3Ini          = getWinProfile(fTemp, "ren8dot3.ini");
  127.   var bIniCreated           = false;
  128.   var fLongFilePath;
  129.   var sShortFilePath;
  130.  
  131.   if(fRen8dot3Ini != null)
  132.   {
  133.     for(i = 0; i < listLongFilePaths.length; i++)
  134.     {
  135.       fLongFilePath   = getFolder(fProgram, listLongFilePaths[i]);
  136.       sShortFilePath  = File.windowsGetShortName(fLongFilePath);
  137.       if(sShortFilePath)
  138.       {
  139.         fRen8dot3Ini.writeString("rename", sShortFilePath, fLongFilePath);
  140.         bIniCreated = true;
  141.       }
  142.     }
  143.  
  144.     if(bIniCreated)
  145.       updateWinReg4Ren8dot3() ;
  146.   }
  147.  
  148.   return(0);
  149. }
  150.  
  151. function DeleteObsoleteShortcutsOnUpgrade()
  152. {
  153.   var subkey;
  154.   var valname;
  155.   var szStartMenuPrograms;
  156.   var szFolderDesktop;
  157.   var winreg;
  158.   var is_winnt;
  159.   var versionThreshold;
  160.   var rv;
  161.   var keyVersion;
  162.   var fFileToCheck;
  163.   var fileFound;
  164.  
  165.   winreg = getWinRegistry();
  166.   if(winreg != null) 
  167.   {
  168.     /* determine if the script is running under NT or not */
  169.     winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
  170.     subkey              = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
  171.     valname             = "CurrentVersion";
  172.     szCurrentVersion    = winreg.getValueString(subkey, valname);
  173.     logComment("szCurrentVersion: " + szCurrentVersion);
  174.     if((szCurrentVersion == "") || (szCurrentVersion == null))
  175.     {
  176.       is_winnt = false;
  177.     }
  178.     else
  179.     {
  180.       is_winnt = true;
  181.     }
  182.  
  183.     logComment("is_winnt value: " + is_winnt);
  184.     if(!is_winnt || restrictedAccess)
  185.     {
  186.       winreg.setRootKey(winreg.HKEY_CURRENT_USER);
  187.       subkey              = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
  188.       valname             = "Programs";
  189.       szStartMenuPrograms = winreg.getValueString(subkey, valname);
  190.       valname             = "Desktop";
  191.       szFolderDesktop     = winreg.getValueString(subkey, valname);
  192.     }
  193.     else
  194.     {
  195.       winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
  196.       subkey              = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
  197.       valname             = "Common Programs";
  198.       szStartMenuPrograms = winreg.getValueString(subkey, valname);
  199.       valname             = "Common Desktop";
  200.       szFolderDesktop     = winreg.getValueString(subkey, valname);
  201.     }
  202.  
  203.     versionThreshold = "6.20.0.2001100100";
  204.     rv = InstallTrigger.compareVersion("Mail", versionThreshold);
  205.     keyVersion = InstallTrigger.getVersion("Mail");
  206.     fFileToCheck = getFolder("Program", "msgbsutl.dll");
  207.     fileFound = File.isFile(fFileToCheck);
  208.  
  209.     logComment("Folder Desktop          : " + szFolderDesktop);
  210.     logComment("Folder StartMenuPrograms: " + szStartMenuPrograms);
  211.     logComment("versionThreshold        : " + versionThreshold);
  212.     logComment("keyVersion              : " + keyVersion);
  213.     logComment("compare result          : " + rv);
  214.     logComment("file to check           : " + fFileToCheck);
  215.     logComment("file to check found     : " + fileFound);
  216.   }
  217.  
  218.   if(fileFound && (rv < 0) && (keyVersion != null))
  219.   {
  220.     deleteThisFile("file:///",   szStartMenuPrograms + "\\Netscape 6\\Mail.lnk");
  221.     deleteThisFile("file:///",   szStartMenuPrograms + "\\Netscape 6\\Free Aol & Unlimited Internet.url");
  222.     deleteThisFolder("file:///", szStartMenuPrograms + "\\Netscape 6", false);
  223.   }
  224. }
  225.  
  226. function registerProgramFolderKey(winreg, fFolderPath)
  227. {
  228.   var subkey;
  229.   var valname;
  230.   var value;
  231.   var err;
  232.  
  233.   /* set the Program Folder Path in the Mozilla key in the Windows Registry */
  234.   subkey  = "SOFTWARE\\Netscape";
  235.   winreg.createKey(subkey,"");
  236.  
  237.   valname = "CurrentVersion";
  238.   subkey  = "SOFTWARE\\Netscape\\Netscape 6";
  239.   winreg.createKey(subkey,"");
  240.  
  241.   valname = "CurrentVersion";
  242.   value   = "6.2 (en)";
  243.   err     = winreg.setValueString(subkey, valname, value);
  244.  
  245.   subkey  = "SOFTWARE\\Netscape\\Netscape 6\\6.2 (en)";
  246.   winreg.createKey(subkey,"");
  247.  
  248.   subkey  = "SOFTWARE\\Netscape\\Netscape 6\\6.2 (en)\\Main";
  249.   winreg.createKey(subkey,"");
  250.  
  251.   valname = "Program Folder Path";
  252.   value   = fFolderPath;
  253.   err     = winreg.setValueString(subkey, valname, value);
  254. }
  255.  
  256. function createShortcuts() 
  257. {
  258.   var subkey;
  259.   var valname;
  260.   var szStartMenuPrograms;
  261.   var szStartMenu;
  262.   var szFolderDesktop;
  263.   var szFolderQuickLaunch;
  264.   var szFolderSendTo;
  265.   var winreg;
  266.   var fWindows;
  267.   var fTemp;
  268.   var fProgram;
  269.   var fileExe;
  270.   var scExeDesc;
  271.   var scProfileDesc;
  272.   var scProfileDescParam;
  273.   var scFolderName;
  274.   var fFolderDesktop;
  275.   var fFolderPath;
  276.   var fFolderPathStr;
  277.   var is_winnt;
  278.   var szCurrentVersion;
  279.   var restrictedAccess;
  280.   var ikwDefined;
  281.  
  282.   winreg               = getWinRegistry();
  283.   fWindows             = getFolder("Windows");
  284.   fProgram             = getFolder("Program");
  285.   fTemp                = fProgram + "Netscp6.exe";
  286.   fileExe              = getFolder("file:///", fTemp);
  287.   scExeDesc            = "Mail";
  288.   scParam              = "-mail";
  289.   scFolderName         = "Netscape 6";
  290.   if(winreg != null) 
  291.   {
  292.     /* This will check to see if the user has restricted access or not.
  293.      * It checks to see if HKEY_LOCALMACHINE\SOFTWARE is writable.  If
  294.      * it is, then access is not restricted.  This is only used to
  295.      * determine which Desktop, Programs, and Start Menu folders
  296.      * are to used: common or per user
  297.      */
  298.     restrictedAccess = false;
  299.     ikwDefined = typeof(winreg.isKeyWritable);
  300.     logComment("winreg.isKeyWritable(): " + ikwDefined);
  301.     if(ikwDefined == "function")
  302.     {
  303.       winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
  304.       if(!winreg.isKeyWritable("SOFTWARE"))
  305.         restrictedAccess = true;
  306.     }
  307.  
  308.     /* determine if the script is running under NT or not */
  309.     winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
  310.     subkey              = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
  311.     valname             = "CurrentVersion";
  312.     szCurrentVersion    = winreg.getValueString(subkey, valname);
  313.     logComment("szCurrentVersion: " + szCurrentVersion);
  314.     if((szCurrentVersion == "") || (szCurrentVersion == null))
  315.     {
  316.       is_winnt = false;
  317.     }
  318.     else
  319.     {
  320.       is_winnt = true;
  321.     }
  322.  
  323.     logComment("is_winnt value: " + is_winnt);
  324.     logComment("restrictedAccess value: " + restrictedAccess);
  325.     if(!is_winnt || restrictedAccess)
  326.     {
  327.       winreg.setRootKey(winreg.HKEY_CURRENT_USER);
  328.       subkey              = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
  329.       valname             = "Programs";
  330.       szStartMenuPrograms = winreg.getValueString(subkey, valname);
  331.       valname             = "Start Menu";
  332.       szStartMenu         = winreg.getValueString(subkey, valname);
  333.       valname             = "Desktop";
  334.       szFolderDesktop     = winreg.getValueString(subkey, valname);
  335.     }
  336.     else
  337.     {
  338.       winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
  339.       subkey              = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
  340.       valname             = "Common Programs";
  341.       szStartMenuPrograms = winreg.getValueString(subkey, valname);
  342.       valname             = "Common Start Menu";
  343.       szStartMenu         = winreg.getValueString(subkey, valname);
  344.       valname             = "Common Desktop";
  345.       szFolderDesktop     = winreg.getValueString(subkey, valname);
  346.     }
  347.  
  348.     winreg.setRootKey(winreg.HKEY_CURRENT_USER);
  349.     subkey              = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
  350.     valname             = "SendTo";
  351.     szFolderSendTo      = winreg.getValueString(subkey, valname);
  352.  
  353.     subkey              = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\GrpConv\\MapGroups";
  354.     valname             = "Quick Launch";
  355.     szFolderQuickLaunch = winreg.getValueString(subkey, valname);
  356.  
  357.     subkey              = "SOFTWARE\\Netscape\\Netscape 6\\6.2 (en)\\Main";
  358.     valname             = "Program Folder Path";
  359.     fFolderPathStr      = winreg.getValueString(subkey, valname);
  360.     if((fFolderPathStr == "") || (fFolderPathStr == null))
  361.     {
  362.       fTemp       = szStartMenuPrograms + "\\" + scFolderName;
  363.       fFolderPath = getFolder("file:///", fTemp);
  364.     }
  365.     else
  366.     {
  367.       /* convert the path string to a path folder object */
  368.       fFolderPath = getFolder("file:///", fFolderPathStr);
  369.     }
  370.     /* convert the path string to a path folder object */
  371.     fFolderDesktop = getFolder("file:///", szFolderDesktop);
  372.  
  373.     logComment("Folder StartMenuPrograms: " + szStartMenuPrograms);
  374.     logComment("Folder StartMenu        : " + szStartMenu);
  375.     logComment("Folder FolderDesktop    : " + szFolderDesktop);
  376.     logComment("Folder FolderSendTo     : " + szFolderSendTo);
  377.     logComment("Folder FolderQuickLaunch: " + szFolderQuickLaunch);
  378.     logComment("fileExe                 : " + fileExe);
  379.     logComment("fFolderPath             : " + fFolderPath);
  380.     logComment("scExeDesc               : " + scExeDesc);
  381.     logComment("fProgram                : " + fProgram);
  382.  
  383.     /* explicitly create the fFolderPath even though the windowsShortcut function creates the folder.
  384.      * This is so that the folder creation gets logged for uninstall to remove it. */
  385.     if(!File.exists(fFolderPath))
  386.       File.dirCreate(fFolderPath);
  387.  
  388.     /* create the shortcuts */
  389.     File.windowsShortcut(fileExe, fFolderPath, scExeDesc, fProgram, scParam, fileExe, 0);
  390.  
  391.     if(!restrictedAccess)
  392.     {
  393.       winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
  394.       registerProgramFolderKey(winreg, fFolderPath);
  395.     }
  396.  
  397.     winreg.setRootKey(winreg.HKEY_CURRENT_USER);
  398.     registerProgramFolderKey(winreg, fFolderPath);
  399.   }
  400.   else
  401.   {
  402.     logComment("winreg is null");
  403.   }
  404. }
  405.  
  406. function updateMapi()
  407. {
  408.   var winreg;
  409.   var szValue;
  410.   var szMapiBackupDll;
  411.   var szDefaultMailClient;
  412.   var programMozMapi32File;
  413.   var mainExePath;
  414.   var sfpProgramMozMapi32File;
  415.   var sfpMainExePath;
  416.   var winsysMapi32File;
  417.   var mapiProxyFile;
  418.  
  419.   winreg = getWinRegistry();
  420.   if(winreg != null) 
  421.   {
  422.     mainExePath = getFolder("Program", "Netscp6.exe");
  423.     programMozMapi32File = getFolder("Program", "mozMapi32.dll");
  424.     winsysMapi32File = getFolder("Win System", "Mapi32.dll");
  425.     winreg.setRootKey(winreg.HKEY_LOCAL_MACHINE);
  426.  
  427.     // If Mapi_backup_dll *and* the default var of
  428.     // HKEY_LOCAL_MACHINE\Software\Clients\Mail is set, then install
  429.     // mozMapi32.dll to the windows system dir as Mapi32.dll.
  430.     szMapiBackupDll = winreg.getValueString("SOFTWARE\\Mozilla\\Desktop", "Mapi_backup_dll");
  431.     szDefaultMailClient = winreg.getValueString("SOFTWARE\\Clients\\Mail", "");
  432.     logComment("szMapiBackupDll: " + szMapiBackupDll);
  433.     logComment("szDefaultMailClient: " + szDefaultMailClient);
  434.     if((szMapiBackupDll != null) && (szMapiBackupDll != "") &&
  435.        (szDefaultMailClient != null) && (szDefaultMailClient == "Netscape 6"))
  436.     {
  437.       // We do not want to log this file to be uninstalled because the
  438.       // uninstaller already has a special way to deal with restoring the
  439.       // appropriate previous Mapi32.dll.
  440.       addFile("",
  441.               "6.20.0.2001102218",
  442.               "bin/mozMapi32.dll",           // file name in jar to extract 
  443.               getFolder("Win System"),       // Where to put this file (Returned from getFolder) 
  444.               "Mapi32.dll",                  // new name when installed
  445.               DO_NOT_UNINSTALL);
  446.     }
  447.  
  448.     sfpProgramMozMapi32File = File.windowsGetShortName(programMozMapi32File);
  449.     sfpMainExePath = File.windowsGetShortName(mainExePath);
  450.  
  451.     szValue = winreg.getValueString("SOFTWARE\\Clients\\Mail\\Netscape 6", "DLLPath");
  452.     if((szValue != null) && (szValue != ""))
  453.       winreg.setValueString("SOFTWARE\\Clients\\Mail", "DLLPath", sfpProgramMozMapi32File);
  454.  
  455.     szValue = winreg.getValueString("SOFTWARE\\Clients\\Mail\\Netscape 6\\DefaultIcon", "");
  456.     if((szValue != null) && (szValue != ""))
  457.       winreg.setValueString("SOFTWARE\\Clients\\Mail\\Netscape 6\\DefaultIcon",
  458.                             "",
  459.                             + sfpMainExePath + ",0");
  460.  
  461.     szValue = winreg.getValueString("SOFTWARE\\Clients\\Mail\\Netscape 6\\protocols\\mailto\\shell\\open\\command", "");
  462.     if((szValue != null) && (szValue != ""))
  463.       winreg.setValueString("SOFTWARE\\Clients\\Mail\\Netscape 6\\protocols\\mailto\\shell\\open\\command",
  464.                             "",
  465.                             sfpMainExePath + " \"%1\"");
  466.  
  467.     szValue = winreg.getValueString("SOFTWARE\\Clients\\Mail\\Netscape 6\\shell\\open\\command", "");
  468.     if((szValue != null) && (szValue != ""))
  469.       winreg.setValueString("SOFTWARE\\Clients\\Mail\\Netscape 6\\shell\\open\\command",
  470.                             "",
  471.                             sfpMainExePath + " -mail");
  472.  
  473.     // Register MapiProxy.dll
  474.     mapiProxyFile = getFolder("Program", "MapiProxy.dll");
  475.     err = File.windowsRegisterServer(mapiProxyFile);
  476.     logComment("File.windowsRegisterServer(" + mapiProxyFile + ") returned: " + err);
  477.   }
  478. }
  479.  
  480. function upgradeCleanup()
  481. {
  482.   // Obsolete files from Netscape 6.0 and Netscape 6.01 that
  483.   // need to be cleaned up.
  484.   deleteThisFile("Components", "signed.dll");
  485. }
  486.  
  487. function updateWinIni()
  488. {
  489.   var fWinIni  = getWinProfile(getFolder("Windows"), "win.ini");
  490.  
  491.   if(fWinIni != null)
  492.   {
  493.     fWinIni.writeString("Mail", "MAPI", "1");
  494.     fWinIni.writeString("Mail", "MAPIX", "1");
  495.   }
  496. }
  497.  
  498. // main
  499. var srDest;
  500. var err;
  501. var communicatorFolder;
  502. var restrictedAccess;
  503.  
  504. // This list contains filenames that are long filenames ( > 8.3) critical during installation time.
  505. // This list is automatically generated during the build process.
  506. // The filenames should include paths relative to the Netscape 6 folder.
  507. // '/' must be used as path delimiters regardless of platform.
  508. var listLongFilePaths = ["chrome/messenger.jar",
  509.                          "components/impComm4x.dll",
  510.                          "components/nsAB4xUpgrader.dll",
  511.                          "components/nsMapiRegistry.dll",
  512.                          "MapiProxy.dll",
  513.                          "mozMapi32.dll"];
  514.  
  515. srDest = 3329;
  516. err    = initInstall("Netscape Mail", "Mail", "6.20.0.2001102218"); 
  517. logComment("initInstall: " + err);
  518.  
  519. communicatorFolder = getFolder("Program");
  520. logComment("communicatorFolder: " + communicatorFolder);
  521.  
  522. if(verifyDiskSpace(communicatorFolder, srDest))
  523. {
  524.   setPackageFolder(communicatorFolder);
  525.  
  526.   /* delete the obsolete shortcuts on upgrade */
  527.   DeleteObsoleteShortcutsOnUpgrade();
  528.  
  529.   // Ren8dot3 process needs to be done before any files have been installed
  530.   // (this includes the temp files during the prepare phase)
  531.   prepareRen8dot3(listLongFilePaths);
  532.  
  533.   err = addDirectory("",
  534.                      "6.20.0.2001102218",
  535.                      "bin",              // dir name in jar to extract 
  536.                      communicatorFolder, // Where to put this file (Returned from getFolder) 
  537.                      "",                 // subdir name to create relative to communicatorFolder
  538.                      true );             // Force Flag 
  539.   logComment("addDirectory() returned: " + err);
  540.  
  541.   // check return value
  542.   if( err == SUCCESS )
  543.   {
  544.     createShortcuts();
  545.     upgradeCleanup();
  546.     updateWinIni();
  547.     updateMapi();
  548.  
  549.     // we don't want to fail on errors for the above
  550.     resetError();
  551.  
  552.     // register chrome
  553.     registerChrome(CONTENT | DELAYED_CHROME,
  554.                    getFolder("Chrome","messenger.jar"),
  555.                    "content/messenger/");
  556.     registerChrome(CONTENT | DELAYED_CHROME,
  557.                    getFolder("Chrome","messenger.jar"),
  558.                    "content/messenger-region/");
  559.  
  560.     // log comments for uninstalling the registry keys created by mail for setting
  561.     // itself up in WinXP's Start menu
  562.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6 []");
  563.     logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6 []");
  564.     logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6 [DLLPath]");
  565.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6\\DefaultIcon []");
  566.     logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6\\DefaultIcon []");
  567.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6\\protocols []");
  568.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6\\protocols\\mailto []");
  569.     logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6\\protocols\\mailto []");
  570.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6\\protocols\\mailto\\shell []");
  571.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6\\protocols\\mailto\\shell\\open []");
  572.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6\\protocols\\mailto\\shell\\open\\command []");
  573.     logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6\\protocols\\mailto\\shell\\open\\command []");
  574.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6\\shell []");
  575.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6\\shell\\open []");
  576.     logComment("Create Registry Key: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6\\shell\\open\\command []");
  577.     logComment("Store Registry Value: HKEY_LOCAL_MACHINE\\Software\\Clients\\Mail\\Netscape 6\\shell\\open\\command []");
  578.  
  579.     // check return value
  580.     err = getLastError();
  581.     if(err == SUCCESS)
  582.     {
  583.       err = performInstall(); 
  584.       logComment("performInstall() returned: " + err);
  585.     }
  586.     else
  587.       cancelInstall(err);
  588.   }
  589.   else
  590.     cancelInstall(err);
  591. }
  592. else
  593.   cancelInstall(INSUFFICIENT_DISK_SPACE);
  594.  
  595. // end main
  596.