Praki Prakash wrote: > I have a XUL application which installs external executables and runs them > later. My problem is to save the install directory so that the full path of > the executable required by nsIProcess can be found. Since I can't write to > mozilla registry at install time, the option I see is to be able to > determine the directory in which mozilla.exe resides. How can I do that?
You don't say on which platform, on windows writing to the windows registry is an option. If your XUL app is using nsIProcess then you can also use the directory service from which you can get an nsIFile for various important directories: the app dir, the xpcom directory (which might not be the same), components dir, plugin dir, profile dir, etc. There are a few OS and XPCOM targets in the raw directory service (See nsIDirectoryService.idl and nsDirectoryServiceDefs.h). The browser-specific locations are set up by "directory service providers", can't find the header file with a quick search but it doesn't sound like you need it anyway. -Dan Veditz
