var folder = Cc['@mozilla.org/file/local;1'] .createInstance(Ci.nsILocalFile); folder.initWithPath('C:\\Program Files\\MyCommonLibs\\Modules'); var folderUrl = ioService.newFileURI(folder); var Cc['@mozilla.org/network/io-service;1'] .getService(Ci.nsIIOService); var ResProtocolHandler = IOService.getProtocolHandler('resource') .QueryInterface(Ci.nsIResProtocolHandler); ResProtocolHandler.setSubstitution('mymodules', folderUrl);