home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 May / CMCD0504.ISO / Software / Shareware / Programare / ephoxedit / editlivesdk.exe / install4.js < prev    next >
Encoding:
JavaScript  |  2003-07-09  |  1.1 KB  |  44 lines

  1. // Conditional alert.
  2. function cAlert (message)
  3. {
  4.    if (!this.silent)
  5.       alert(message);
  6. }
  7.  
  8. // Create a version object and a software update object
  9. var vi = new netscape.softupdate.VersionInfo(2, 0, 1, 0);
  10. var su = new netscape.softupdate.SoftwareUpdate(this, 
  11.    "Asgard Software Plug-in");
  12.  
  13. // Start the install process
  14. var err = su.StartInstall("/AsgardSoftware/ActiveXContainerPlugin", vi, 
  15.    netscape.softupdate.SoftwareUpdate.FULL_INSTALL);
  16.  
  17. if(!err)
  18. {
  19.    // Find the plug-ins directory on the user's machine
  20.    var PIFolder = su.GetFolder("Plugins");
  21.  
  22.    // Install the files. Unpack them and list where they go
  23.    err = su.AddSubcomponent("Asgard Software Plugin DLL", vi, "npaxctrl.dll",
  24.       PIFolder, "npaxctrl.dll", this.force);
  25.  
  26.    if(!err)
  27.        err = su.FinalizeInstall();
  28. }
  29.  
  30. if(!err)
  31. {
  32.     navigator.plugins.refresh(false);
  33. }
  34. else if(err == 999)
  35. {
  36.    cAlert("The Asgard ActiveX Container Plugin has been copied onto your system. In order to complete the installation you must reboot your machine.");
  37. }
  38. else
  39. {
  40.    cAlert("Installation failed (error = " + err + ")");
  41.    su.AbortInstall();
  42. }
  43.  
  44.