Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

updating FireFox installer for Windows Vista and default behaviors

6 views
Skip to first unread message

Ed Averett [MS]

unread,
May 5, 2006, 1:17:37 PM5/5/06
to
My name is Ed Averett. I am a promgram manager on Windows Vista. I have
been working with Mike Beltzner about some small modifications firefox needs
to make to its installer to work better in Windows Vista.

In Windows Vista, we have provided a new set of functionality for
applications to take advantage of. This new set of functionality is called
"Default Programs". Default Programs was designed to help users make
choices about their default behaviors. A large part of this is that
defaults in Vista and beyond will be primarily controlled at the Per User
level instead of the Per Machine level. This allows much more flexibility
for the multi user computer environment that we believe is going to become
the standard. Part of this is adding new centralized UI for the user, but
the other part is giving ISVs (Independent Software Vendors) the tools they
need to help a user express choice. Default programs gives an application:

. A simplified process for taking defaults
. Per user file and protocol associations support
. Programmatic way to check for defaults instead of crawling the registry
. Common windows UI to reuse
. Advertising area within Windows


Mike sugested this is the right forum to discuss and socialize the changes
that need to be made. I will continue to post more information on this but
I thought this would be a good introduction.

The short list of things that need to change:
1. The installer always needs to write FireFoxHTML Progid (the current
installer only does it if FF is selected to be the default)
2. The installer needs to Create new ProgIDs specific to its protocols
(for instance FireFox.Url.HTTP and FireFox.Url.HTTPS)
3. The installer needs register Firefox with the new default programs
schema ( this is a schema written to HKLM at install time)
4. Rev the code that FF uses to claim\check defaults to use the new API
set.

cheers,
Ed

Robert Strong

unread,
May 5, 2006, 2:56:48 PM5/5/06
to Ed Averett [MS], dev-apps...@lists.mozilla.org
Hi Ed,

Are there documents regarding these changes available?

Thanks,
-Robert

> _______________________________________________
> dev-apps-firefox mailing list
> dev-apps...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-apps-firefox

Mike Beltzner

unread,
May 5, 2006, 5:41:07 PM5/5/06
to Robert Strong, Ed Averett [MS], dev-apps...@lists.mozilla.org
On 5/5/06, Robert Strong <rst...@mozilla.com> wrote:
> Are there documents regarding these changes available?

Ed asked me if I could post some to a server since the newsgroup lacks
the ability to attach binaries. Apparently this is a preview of what
is to become MSDN documentation :)

http://people.mozilla.org/~beltzner/vista-program-defaults/

The .doc is a cookbook for the various APIs, the .reg.txt files are
reg files that would insert Firefox and Thunderbird into the default
programs API, and the .png files are screenshots of how the UI will
look.

Apparently if we want to associate a URL for Mozilla with the programs
we'll need to include a digital certificate with the installer. I'm
sure that Ed can give you more detail.

cheers,
mike

--
/ mike beltzner / user experience lead / mozilla corporation /

Ed Averett [MS]

unread,
May 5, 2006, 6:15:43 PM5/5/06
to
Mike is correct. Thanks again for posting the documentation :)

We are trying to push this documentation up to MSDN as quick as possible but
we want to be very open about communicating with out partners about the
changes in vista.

The cookbook is the best place to start. It is a quick tutorial of the
experience in Vista and how to make an show up and utilize the new platform
we have built for vista. It should be only minor changes, but it will make
certian tasks around defaults significantly easier.

In addition to the cookbook their are 2 sample registrations that I wrote
for firefox and thunderbird. They need to be converted to .reg files by
removing the .txt extension and then they should be enough register Firefox
and thunderbird. These were just an approxiamtion by me since I don't know
all the protocols and file extensions that these 2 apps care about, but it
covers the major bases. I didn't create FireFoxHTML progid though since it
is currently created by FF if you run FF as part of the installer and tell
it to become default.

If you have a current vista CTP build, these registrations will work, but
make sure to update the commands exes drive path. Unfortunately regidet
doesn't allow you to use system variables. I defaulted to the D drive since
that is where most people seem to be running vista. In the actaul
installers you will want to use the %ProgramFiles% system variable to
reference the exe strings.

cheers,
Ed


"Mike Beltzner" <mbel...@gmail.com> wrote in message
news:mailman.164.1146865273...@lists.mozilla.org...

Gijs Kruitbosch ("Hannibal")

unread,
May 5, 2006, 6:23:49 PM5/5/06
to Mike Beltzner, Robert Strong, Ed Averett [MS]
Mike Beltzner wrote:
> <snip>

> http://people.mozilla.org/~beltzner/vista-program-defaults/
>
> The .doc is a cookbook for the various APIs, the .reg.txt files are
> reg files that would insert Firefox and Thunderbird into the default
> programs API, and the .png files are screenshots of how the UI will
> look.
>
> Apparently if we want to associate a URL for Mozilla with the programs
> we'll need to include a digital certificate with the installer.
> <snip>

How do extensions and XULRunner fit into this picture? ChatZilla, for
example, would want to be available as the default handler for the
irc:// (and the ircs:// ) protocol. Will the extension need its own
digital certificate, or can they trade on the browser's name and cert as
they share a binary? Is there going to be an API (XPCOM iface?) for
extensions to tell Firefox to register protocol X for use with extension
Y? What about the XULRunner world where everything can share just one
binary? Is one certificate enough there?

(Other consumers of this kind of stuff would be Sage or other news
readers for feed: urls, GMail/Hotmail extensions that want to handle the
mailto: links by going to webmail, or even FTP clients like FireFTP)

I'm crossposting to m.d.platform because I think it's relevant to
discuss what, if anything, needs to be done to make XULRunner /
extensions work well with this. It'd be great if some folks with a
better idea of how XULRunner-the-platform will look would share their
thoughts on this.


-- Gijs

Ed Averett [MS]

unread,
May 5, 2006, 7:49:02 PM5/5/06
to
can you tell me a little more how chatzilla works.

If I go to the run dialog and type "irc:" what is launched. Is it firefox
and then chatzilla or is just chatzilla?

The new defaults scheme is controlling the defaults for how something
executed from within windows:
-- double clicking on a file
-- launching something from start run or a cmd window
--clicking on a hyper link

To answer your question:s

if the applications share the same binary they should be able to trade on
the same cert and registration. If you wanted to break these out into
seperate registrations that is possible as well. You can use the
ApplicationName registry key to register 2 different "apps" on the same
binary. They can register for different defaults, but trace back to the
same exe.

There is a set of APIs and they will be availiable through a COM interface.

Is there going to be an API (XPCOM iface?) for extensions to tell Firefox to
register protocol X for use with extension Y?

I am trying to understand this question a little better. Is the idea
here I install an extension for firefox and when I click on a link it
invokes firefox and the extension? Can you tell me how extensions are
launched from outside firefox.

You are totally correct that this affects things like news readers and mail
clients. we are going around working with them to update as well.

cheers,
Ed

"Gijs Kruitbosch ("Hannibal")" <gijskru...@gmail.com> wrote in message
news:445BD075...@gmail.com...

Ed Averett [MS]

unread,
May 5, 2006, 7:50:30 PM5/5/06
to
can you tell me a little more how chatzilla works.

If I go to the run dialog and type "irc:" what is launched. Is it firefox
and then chatzilla or is just chatzilla?

The new defaults scheme is controlling the defaults for how something
executed from within windows:
-- double clicking on a file
-- launching something from start run or a cmd window
--clicking on a hyper link

To answer your question:s

if the applications share the same binary they should be able to trade on
the same cert and registration. If you wanted to break these out into
seperate registrations that is possible as well. You can use the
ApplicationName registry key to register 2 different "apps" on the same
binary. They can register for different defaults, but trace back to the
same exe.

There is a set of APIs and they will be availiable through a COM interface.

Is there going to be an API (XPCOM iface?) for extensions to tell Firefox to


register protocol X for use with extension Y?

I am trying to understand this question a little better. Is the idea
here I install an extension for firefox and when I click on a link it
invokes firefox and the extension? Can you tell me how extensions are
launched from outside firefox.

You are totally correct that this affects things like news readers and mail
clients. we are going around working with them to update as well.

cheers,
Ed

"Gijs Kruitbosch ("Hannibal")" <gijskru...@gmail.com> wrote in message
news:445BD075...@gmail.com...

Gijs Kruitbosch ("Hannibal")

unread,
May 5, 2006, 8:31:11 PM5/5/06
to
Ed Averett [MS] wrote:
> can you tell me a little more how chatzilla works.
>
> If I go to the run dialog and type "irc:" what is launched. Is it firefox
> and then chatzilla or is just chatzilla?

By default, we don't actually register anything yet, as the Mozilla
API's have only recently gotten an interface for JS to set 'random'
registry keys (ChatZilla aims not to ship any compiled components
itself, and is written entirely in JavaScript, XUL and some other web
technologies).

However, Firefox knows that ChatZilla is installed in the profile it's
running, and when passed an irc:// url, will start ChatZilla to do
something useful with it. The firefox.exe file (and the process started)
are in essence "Firefox", but the main window will be ChatZilla's. You
can also just start ChatZilla from within the browser.

In the current scheme of things, if firefox is running with sufficient
privileges to modify the registry, we could register ourselves. We just
haven't written any code that does that yet (though a bug is on file).
My understanding is, however, that it's going to be harder, and highly
discouraged to users, to run their daily applications with administrator
privileges.

I'm hoping this answers your question.

> The new defaults scheme is controlling the defaults for how something
> executed from within windows:
> -- double clicking on a file
> -- launching something from start run or a cmd window
> --clicking on a hyper link

Right, so that's sort of similar to the current registry settings (which
are machine wide, from what I know (which is not a great deal, I might
add, so who knows if I'm wrong...).

> To answer your question:s
>
> if the applications share the same binary they should be able to trade on
> the same cert and registration. If you wanted to break these out into
> seperate registrations that is possible as well. You can use the
> ApplicationName registry key to register 2 different "apps" on the same
> binary. They can register for different defaults, but trace back to the
> same exe.

Alright. When discussing this with Mike Beltzner, he mentioned that to
do such registrations, the application will be *required* to have admin
privileges. How hard is it to get those while the application is
running, in the new Vista world?

The problem I'm seeing is that users select one or more extensions to be
installed at the next start. I am wondering how hard it would be to
actually modify the registry at the next start, since that would require
admin privileges. After that, you would probably not want to continue
running the application with admin privileges?

Also, these extensions are installed in the user's profile (in the
Windows 2000/XP world, somewhere in %APPDATA%), so I'm wondering how the
getting of admin privileges relates to that - are you actually switching
to another user, or temporarily raising the privileges of the current
user? If you're switching to another user, would that mean that suddenly
the location of %APPDATA% is different, because I guess that'd be
something we'd have to take into account also.

(Note: any XPInstall/Extension guru out there please shout at me if I'm
not right about any of this)

> There is a set of APIs and they will be availiable through a COM interface.
>
> Is there going to be an API (XPCOM iface?) for extensions to tell
> Firefox to
> register protocol X for use with extension Y?
> I am trying to understand this question a little better. Is the idea
> here I install an extension for firefox and when I click on a link it
> invokes firefox and the extension? Can you tell me how extensions are
> launched from outside firefox.

This question was actually more geared toward some of the
XULRunner/Firefox folks, as supplying an internal XPCOM interface
accessible from JavaScript (the language most extensions are primarily
written in) is their responsibility, and not yours. They will of course
need a COM or other form of Windows API to call back on, but I deduced
from the previous posts that such a thing was present :-). I will try
explaining for completeness though:

Most extensions are not like standalone applications or windows at all,
ChatZilla, Venkman (a debugger) and FireFTP are somewhat of an
exception. ChatZilla and Venkman register commandline handlers within
Firefox, meaning if Firefox is started with console argument -chat or
-venkman, respectively, that they will be notified and can launch their
own code (and window). Similarly, extensions can control Firefox to the
extent that it will use the extension to handle certain URL schemes.
ChatZilla does this too and registers for the irc and ircs schemes
within Firefox. So using these two mechanisms, it's entirely possible to
launch a specific extension from outside Firefox.

I would, however, say that this is might be an edge case for the
extension world - but not for XULRunner, which is designed to be a
generic runtime for XUL applications (like Firefox and Thunderbird, but
also Songbird, ChatZilla and various other applications).

I hope that cleared up some of your questions. :-)

-- Gijs

Ed Averett [MS]

unread,
May 8, 2006, 11:51:24 AM5/8/06
to
Hannibal, thanks for all the great information :). I am getting a clearer
picture now. sorry for the long mail in advance.

A couple of things:
You are right that it will be difficult to get an application to run with
Admin privilieges.
In the new vista world the norm for every process is running as standard
user.
You are also correct that you need to run with administrator privileges to
write to HKLM (these are machine level defaults and where the default
programs registrations are stored)
Typically installs are always elevated so that is when applications
register. We can autodatect installs and get the user to elevate them so
everything installs correctly.
However, it sounds like chatzilla is totally per user which would typically
not require elevation since it is all in the user's context.

I have been playing around with Chatzilla on XP and Vista and I have noticed
a few things that lead me to believe everything will be okay. In Xp, you
can't open the run dialog and do irc:\ or any permutation of that (I believe
you were expecting that). You actually get an error because there is not
regeistered handler for irc in the system. This is true for XP and Vista.
However, if you type irc: into firefox it will launch chatzilla if it is
installed. This tells me that firefox is probably doing some checking
within itself to see if there are any valid extension handlers installed to
the user. This means it isn't using any shellexecute behavior so the
firefox to chatzilla transition will always work in vista without any new
work.

As long as the desire is to have the correct experience be that firefox
launches chatzilla when it is passed an IRC url there is no work needed to
make this possible for vista. It will just work. However, if you want to
expand the scope of chatzilla to make things like launching from the start
dialog by typing irc or other windows specific launching places there will
be some work, but I am not sure that is the ultimate goal. My understanding
is that chatzilla is totally selfcontained app that is really an extension
to firefox. It is very lightweight and very non-destructive as it is
totally per user. This is part of the reason it has no file or protocol
associaitons within windows.

To have a own a URL associations within windows an application has to write
some per machine registrations. This is true for xp as well as vista. What
this really boils down to installing chatzilla to the entire machine instead
of just a single user. I think that is counter to the goals of chatzilla,
but I could be mistaken. If this was a general thing that extensions to
firefox want to do I would suggest the following implimentation. Within FF
give the ability to install an extension to the entrie machine. FF has code
that handles the elevation path. Have FF write module that allows an
extension to plug into its already existing defaults registration. Note:
both of these should be evaluated from security perspective as well. I
don't have strong grasp on the security guarantees FF gives for extensions,
but generally as things start being per machine entities the security
implications become much more serious.

cheers,
Ed


"Gijs Kruitbosch ("Hannibal")" <gijskru...@gmail.com> wrote in message

news:K_qdncESMdTRc8bZ...@mozilla.org...

0 new messages