[Project_owners] install.js

Michael Vincent van Rantwijk mv_van_rantwijk at SPAMFREEyahoo.com
Mon Jun 20 18:57:52 EDT 2005


Eric Jung wrote:
> Hi,
> I'm trying to get my install.js to copy the file
> defaults/passwordmaker.xml, which is inside the XPI, to the profile
> directory (thanks to Phillip Chee for the help so far). Nothing
> happens... is there anyway I can get a log of the install procedure
> to see if there was an error? Here's the code I'm using...
> 
> // Add JAR file
> var profileDir = Install.getFolder('Profile', 'chrome')

He, shouldn't 'Profile' be 'Current User' ?

> var err = Install.addFile(null, 'chrome/' + jarName, profileDir,
> null);
> // Add passwordmaker.xml
> if(err == SUCCESS) {
>   err = addFile("PasswordMaker Defaults", "0.6.1",
> "defaults/passwordmaker.xml", profileDir, "passwordmaker.xml", true);
>   // on unixy platforms, global defaults directory is not writable!
> Ignore this error but notify user.
>  if(err == ACCESS_DENIED || err == READ_ONLY) {
>    Install.alert("Could not write passwordmaker.xml to " + profileDir
> + ", probably due to a lack of permissions.\nYou should re-run the
> installation with an account\nthat has permissions or copy the file
> there manually.");
>    err = SUCCESS;
>  }
> }
> 
> Thank you,
> Eric Jung


More information about the Project_owners mailing list