Firefox MSI install for corporate rollout (silent install)

Discussion of features in Mozilla Firefox
Locked
oldtimer
Posts: 827
Joined: July 9th, 2004, 1:48 pm

Post by oldtimer »

It was opened in Notepad. What other alternative would you recommend? A hex editor? [Never used one and don't think I will... Seems a bit complicated that]

But, if you could graciously format it in a way I could copy and paste into a notepad file and save as a reg script I would really be grateful.
Current: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2pre) Gecko/2007112000 Minefield/3.0b2pre
For kicks: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
User avatar
Robert S.
Posts: 4399
Joined: April 24th, 2004, 3:04 am
Location: Bay Area, CA

Post by Robert S. »

I don't know for sure but I think wordpad handles it better than notepad... I do know that notepad has issues though and a hex editor would not be of use. I tend to use editplus... I'll PM you with an email that you can send the file to.
User avatar
FordP
Posts: 61
Joined: November 6th, 2002, 7:48 pm
Location: Baltimore, MD

Post by FordP »

I think we should get both the MSI and the registry patch submitted to the devs because it would help with Network Deployments ans spread the firefox fire. The Desktop icon is sweet becuase it helps integrate Firefox more with the Windows desktop, by making it seem less of like a third party application and more of like a program that was built with Windows. :D

The only thing that needs to get incorporated in my opion for the desktop icon to get submitted is that there needs to be an option in Mozilla's preferences to remove the icon if a user doesn't want to display the icon on the desktop.

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{EC8030F7-C20A-464F-9B0E-13A3A9E97384}]
@="Mozilla Firefox"
"InfoTip"=hex(2):4d,00,6f,00,7a,00,69,00,6c,00,6c,00,61,00,2e,00,6f,00,72,00,\
  67,00,20,00,53,00,74,00,61,00,6e,00,64,00,20,00,61,00,6c,00,6f,00,6e,00,65,\
  00,20,00,77,00,65,00,62,00,20,00,62,00,72,00,6f,00,77,00,73,00,65,00,72,00,\
  00,00

[HKEY_CLASSES_ROOT\CLSID\{EC8030F7-C20A-464F-9B0E-13A3A9E97384}\DefaultIcon]
@="\"C:\\Program Files\\Mozilla.org\\Mozilla Firefox\\firefox.exe\",0"

[HKEY_CLASSES_ROOT\CLSID\{EC8030F7-C20A-464F-9B0E-13A3A9E97384}\Shell]

[HKEY_CLASSES_ROOT\CLSID\{EC8030F7-C20A-464F-9B0E-13A3A9E97384}\Shell\open]
@="&Open"

[HKEY_CLASSES_ROOT\CLSID\{EC8030F7-C20A-464F-9B0E-13A3A9E97384}\Shell\open\Command]
@="\"C:\\Program Files\\Mozilla.org\\Mozilla Firefox\\firefox.exe\""

[HKEY_CLASSES_ROOT\CLSID\{EC8030F7-C20A-464F-9B0E-13A3A9E97384}\Shell\open (safe-mode)]
@="Open (&Safe Mode)"

[HKEY_CLASSES_ROOT\CLSID\{EC8030F7-C20A-464F-9B0E-13A3A9E97384}\Shell\open (safe-mode)\Command]
@="\"C:\\Program Files\\Mozilla.org\\Mozilla Firefox\\firefox.exe\" -safe-mode"

[HKEY_CLASSES_ROOT\CLSID\{EC8030F7-C20A-464F-9B0E-13A3A9E97384}\Shell\options]
@="Op&tions"

[HKEY_CLASSES_ROOT\CLSID\{EC8030F7-C20A-464F-9B0E-13A3A9E97384}\Shell\options\Command]
@="\"C:\\Program Files\\Mozilla.org\\Mozilla Firefox\\firefox.exe\" -chrome \"chrome://browser/content/pref/pref.xul\""

[HKEY_CLASSES_ROOT\CLSID\{EC8030F7-C20A-464F-9B0E-13A3A9E97384}\Shell\profilemanager]
@="&Profile Manager"

[HKEY_CLASSES_ROOT\CLSID\{EC8030F7-C20A-464F-9B0E-13A3A9E97384}\Shell\profilemanager\Command]
@="\"C:\\Program Files\\Mozilla.org\\Mozilla Firefox\\firefox.exe\" -ProfileManager"

[HKEY_CLASSES_ROOT\CLSID\{EC8030F7-C20A-464F-9B0E-13A3A9E97384}\ShellFolder]
"Attributes"=hex:18,00,00,00
"HideOnDesktopPerUser"=""


I have modified the code a little bit by adding this string. I added the infotip line at the top so when you hover over the icon it will display the text "Mozilla.org stand alone web browser" This is only thing that I could think of that was terse but yet informative. I'm sure if this got accepted it would get altered to something more mainstream but its a start.

Just my $0.02
User avatar
FordP
Posts: 61
Joined: November 6th, 2002, 7:48 pm
Location: Baltimore, MD

Post by FordP »

I've figured out a real simple way to toggle the icon on the desktop for users. The only thing now is to modify the XUL in the prefs dialog to include this switching mechanism. In the modified registry file that I posted earlier. There was another key

Code: Select all

[HKEY_CLASSES_ROOT\CLSID\{EC8030F7-C20A-464F-9B0E-13A3A9E97384}\ShellFolder]
"HideOnDesktopPerUser"=""


This key allows a user the ability to toggle The Mozilla Firefox desktop icon from this location in the registry

Code: Select all

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
"{EC8030F7-C20A-464F-9B0E-13A3A9E97384}"=dword:00000000


A Dword value of 1 removes the icon and a Dword value of 0 puts the icon no the users desktop. This setting is applied per user. So if one user decides he/she wants the icon it will they can turn it on or off and not affect the whole desktop environment. I have only tested this on WinXP. I'm pretty sure it will work with Win2k because I got this idea from some registry tweaks we apply to the machines that I administer.

Some testing on different platforms would be nice. The only thing of concern is that this that absolute paths are used rather than path variables.
User avatar
Robert S.
Posts: 4399
Joined: April 24th, 2004, 3:04 am
Location: Bay Area, CA

Post by Robert S. »

There should be a way be able to hide and unhide it via Set Program Acces and Defaults.
User avatar
FordP
Posts: 61
Joined: November 6th, 2002, 7:48 pm
Location: Baltimore, MD

Post by FordP »

The Set Program Access and Defaults is a global option. Meaning that it would remove the icon for all users.

If a user would like to make Firefox his defualt browser he can choose it in the options dialoge under "General" and then they can toggle on and off the icon for themselves using the method I've added to your original code. If I'm not mistaken the "Set Program Access and Defaults" already works for Firefox because it is registered as a browser in Windows. I know some users don't want any icons on thier desktop so this method will allow them to take the icon away if neccessary.

The additions I made were just to keep the image of giving alternative choices to Firefox users. Which is something I believe Firefox is all about.
User avatar
Robert S.
Posts: 4399
Joined: April 24th, 2004, 3:04 am
Location: Bay Area, CA

Post by Robert S. »

The Set Program Access and Defaults will still need to be able to hide / unhide this... also, the ShellFolder Attributes hex value can be set to 24 to allow removal of the icon
User avatar
FordP
Posts: 61
Joined: November 6th, 2002, 7:48 pm
Location: Baltimore, MD

Post by FordP »

I tested the code I posted and it worked with attributes = 18

Code: Select all

[HKEY_CLASSES_ROOT\CLSID\{EC8030F7-C20A-464F-9B0E-13A3A9E97384}\ShellFolder]
"Attributes"=hex:18,00,00,00


But I'll test it with the value 24 to see what happens.

wig_out_on_me, good job on this I wouldn't have even thought of it but I think it should be a welcome addition.
User avatar
Robert S.
Posts: 4399
Joined: April 24th, 2004, 3:04 am
Location: Bay Area, CA

Post by Robert S. »

The value 24 provides the option to in the context menu to delete the namespace icon and it will also set the reg value you referred to... I haven't tried it with the value of 18. BTW: the current setup routine does remove the shortcut via program access and defaults for the suite though I haven't tried it with firefox.

I came up with the namespace icon idea for Firefox well over 6 months ago... I've used them previously when developing / distributing apps.
User avatar
FordP
Posts: 61
Joined: November 6th, 2002, 7:48 pm
Location: Baltimore, MD

Post by FordP »

So the value of 24 it is. I've PMed Ben, to see if this could go in for the 1.0 release. If he has time to check his his inbox hopefully he'll take a look at this. It seems like a really cool thing that would help the image of Firefox on the Windows Desktop, although it is short notice, maybe becauase its impact is low it may go into the tree. So other users to enjoy you good work.

Cheers
User avatar
FordP
Posts: 61
Joined: November 6th, 2002, 7:48 pm
Location: Baltimore, MD

Post by FordP »

One thing I've noticed with the attribute value set to 24 is that you can't rename the icon. I know this is nitpicky but would you know the value to allow it to show the "Create Shortcut + Rename + Delete" when you right click on it. I've tried a couple of different values but I can't seem to get the right one.

wig_out_on_me where did you get the documentation inorder to do this? If there is any could you post it. Thanks
User avatar
Waldo
Posts: 596
Joined: July 29th, 2003, 8:21 am
Location: Cambridge, MA
Contact:

Post by Waldo »

It's extremely unlikely you'll get in contact with Ben that way. If you really want to see this, the only safe bet is to make this into a patch and submit it to the bug (whichever it is, do a search). Talk without usable action isn't particularly helpful.
User avatar
FordP
Posts: 61
Joined: November 6th, 2002, 7:48 pm
Location: Baltimore, MD

Post by FordP »

Point taken Waldo. So is there documentation anywhere on how to submit a patch. I'm kind of a n00b to the whole Mozilla coding scene. If you could point me in the write direction. I'll take strides to submitting a patch. I would also have to patch the options dialouge to allow the removal of the icon. Do you have an preferences of where it should go?

I'll take the point on this because I'm bored. wig_out_on_me if you want to do this I'll step aside for you.
User avatar
Waldo
Posts: 596
Joined: July 29th, 2003, 8:21 am
Location: Cambridge, MA
Contact:

Post by Waldo »

As you've been building Mozilla, I assume you have a working build environment set up as detailed in the Mozilla Win32 build instructions. That will get you most of the way toward writing patches, because at that point you should already have everything you need: source code to edit, cvs to create patches, and (hopefully) the know-how to work at figuring out the Mozilla build process.

Making the patch should not be particularly difficult, as you already have most of the new stuff done for it. The biggest problem is integrating it into the source code. The source code for the installer is primarily located in mozilla/browser/installer/windows/. This code is called from within mozilla/browser/installer/Makefile.in, which is where the platform-specific forking occurs to make a Linux build vs. a Windows build using the exact same command. I don't know if you'll need to edit the second file or whether it's possible to add MSI capabilities by editing only the files inside the first location or not; you'll have to figure that out yourself, as I'm not technically familiar with the installer.

Anyway, make the necessary changes to the code. When you're done, move into the top-level directory (not mozilla/, but the one above it). Then run 'cvs diff -pu8N' and pipe the output to a file (> C:\some-file.txt, I think). There will be files you've added as well; because cvs is dumb you can't make a diff of those unless you have cvs commit access. For those files, just zip them up and attach them to the bug with proper instructions as to how to put them in a source tree. You'll also at that point attach the patch you created with the 'cvs diff -pu8N' command. After that, it's wait and hope they get to it, which still might happen.

You will also probably want to cc bsmedberg (I believe @covad.net) to the bug, because doubtless what you've made isn't localized. That's a whole other problem to fix, and I don't believe it's particularly easy to understand at a glance how you'd localize a new file like yours will be. For 1.0 they may just accept an English-only one, as that's where it's most needed, but eventually they'll want it localized just the same as the regular installer.

A couple other things of note: don't put the icon into the patch. If you want the special icon, by your admission it'll require an addition to the Options window to remove it. That's not going to happen at this point, because doing so would introduce more stuff to be localized, and the UI has been pretty much 95% frozen since October 1 (and the Help docs for the UI are also now frozen, so that'd be something else to fix). Just forget the icon (perhaps comment out the source code used to create the icon, but leave it there for possible work post-1.0) and work with the basics: creating an MSI install file that installs Firefox. Let the Firefox installer take care of as much as it can regarding installation and just have the MSI be a wrapper around it (if that's how your stuff works - I haven't looked, but you'll want to minimize the amount of function the MSI stuff duplicates that's already in the EXE installer). Second, if you want to see your patch used, make certain to remain as available as possible regarding review of it. There's no doubt in my mind that for this there'll be comments on your methods. Third, you'll want to do this ASAP, because right now there's a window of opportunity in which this bug is on the radar for possibly being fixed by 1.0, and every second is a second closer to the decision you don't want to see made.

That's all I can help with now. If you have further questions today, I'd suggest trying IRC. I won't be around much the rest of the day, so you're unlikely to be able to contact me. Later days I might be more available, but it's uncertain at best.
User avatar
Robert S.
Posts: 4399
Joined: April 24th, 2004, 3:04 am
Location: Bay Area, CA

Post by Robert S. »

I have never been able to find docs for the different values... I've always used the values from other apps to figure them out. I just checked and a value of 30 provides delete, create shortcut, and rename.

As far as the registry entries go and localization all strings can use the same strings that are used by the existing shortcuts... if by chance a shortcut is created with a different string then the string used by the process (e.g. the installer) that creates the shortcut can be used for naming this namespace shortcut in the registry as well. The installer is already working in the registry so it shouldn't be difficult to add the necessary code. As for new UI for the unhiding I don't see how this could be done but the process for setting the default browser could be made to also check these registry keys and set them correctly especially since that is essentially what it is already doing in a different section of the registry. The main area that I can see problems with is the Set Program Access and Defaults being able to hide and unhide... I expect that this functionality will be needed under some circumstances.

I won't have the cycles to look into adding this for at least a week or two so if anyone wants to try it please don't hesitate... even then, I believe it is way too close to release to add this.
Locked