Windows 7 and installing files to another program's install directory - FireFox XPCOM component
I am helping another programmer build an install program that needs to locate the Mozilla program directory and install the files necessary to support an XPCOM component. M开发者_开发问答y tool of choice is Inno Setup, a standard "setup.exe" type of installation program creator, but I have some concerns in this context.
1) Once I locate the Mozilla install directory via the Window's registry, is Windows 7's security layer going to prevent my "setup" program from writing files to FireFox's program directory? If so, how does one work around this?
2) Is there a better path/method for properly installing an XPCOM component to a FireFox installation? I did some light reading on XPInstall and Add-Ons, but most of what I found seems like a lot of work just to copy a couple of files. If there is a "crash course" document/web page on this exact subject, I'd appreciate the URL.
Thanks.
Assuming that the user has administrator privileges and that User Account Control (UAC) allows the install program to use them, it should not be any greater problem than installing files into your program's own subdirectory of Program Files, at least in theory.
You may want to look at the document "Adding Extensions using the Windows Registry". That would obviate the need to even touch Firefox's install directory. You would still set up your extension's directory just like that of one packaged as a .xpi file and distributed through AMO.
精彩评论