home *** CD-ROM | disk | FTP | other *** search
- // Conditional alert.
- function cAlert (message)
- {
- if (!this.silent)
- alert(message);
- }
-
- // Create a version object and a software update object
- var vi = new netscape.softupdate.VersionInfo(2, 0, 1, 0);
- var su = new netscape.softupdate.SoftwareUpdate(this,
- "Asgard Software Plug-in");
-
- // Start the install process
- var err = su.StartInstall("/AsgardSoftware/ActiveXContainerPlugin", vi,
- netscape.softupdate.SoftwareUpdate.FULL_INSTALL);
-
- if(!err)
- {
- // Find the plug-ins directory on the user's machine
- var PIFolder = su.GetFolder("Plugins");
-
- // Install the files. Unpack them and list where they go
- err = su.AddSubcomponent("Asgard Software Plugin DLL", vi, "npaxctrl.dll",
- PIFolder, "npaxctrl.dll", this.force);
-
- if(!err)
- err = su.FinalizeInstall();
- }
-
- if(!err)
- {
- navigator.plugins.refresh(false);
- }
- else if(err == 999)
- {
- cAlert("The Asgard ActiveX Container Plugin has been copied onto your system. In order to complete the installation you must reboot your machine.");
- }
- else
- {
- cAlert("Installation failed (error = " + err + ")");
- su.AbortInstall();
- }
-
-