搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

Setting FF as default browser from command line on Win7 doesn't work

  • 1 个回答
  • 4 人有此问题
  • 2 次查看
  • 最后回复者为 guigs

more options

I am working on an imaging process to be used for deploying new PCs. The imaging tool I use is KACE which installs Windows 7 x64 and then runs predefined commands to install programs and otherwise customize the machine.

As part of the imaging process I install FF and Google Chrome. I want to set FF as the default browser for both the current user and all new users that login. The imaging process runs using the local administrator account, when the machine is delivered to an end user they will login with their Active Directory account, so that is why the default browser setting must be set for all future users as well.

The mechanism for accomplishing this must be from the command line or via a script (doesn't matter what kind of script) as any manual interaction would defeat the purpose of this method of imaging systems.

I have tried using "firefox.exe -silent -setDefaultBrowser" and have verified using process monitor that when I run that command things are being written to the registry, however it does not actually set the default browser to Firefox. I can verify that by going to Start > Run > www.google.com and observing that Google opens in a browser which is not Firefox.

If I open Firefox and go to Tools > Options > Advanced > Set Default Browser and use the button there, then it does set Firefox as the default browser, but since that requires human interaction that is not a feasible solution.

Can anyone offer a suggestion as to how I can accomplish this?

所有回复 (1)

more options

I have no idea I have tried firefox.exe -silent -setDefaultBrowser regularly and it opens up the profile manager and asks to run a program as well as opens with a prompt "Do you want to set Firefox as your default browser"

I did some digging, does this have to do with the registration of programs to choose as default from the command line? http://msdn.microsoft.com/en-us/libra.../cc144154%28v=vs.85%29.aspx

Would you need to register the program as default? http://msdn.microsoft.com/en-us/libra.../cc144154%28v=vs.85%29.aspx#reg_examples

OR does -setDefaultBrowser do this? Does it create the HKEY after the first run?