[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3439
  • Last Modified:

How can I set the default browser from the command line or from a Powershell script in Win7?

Does anyone know of a way to set the default browser using PowerShell, a batch file, or simply from the command line from a Win7 unit?
When you create a web page it is best to see all of your changes through the "eyes" of several of the more popular browsers since they tend to render the page slightly differently (sometimes more than slightly).  What looks good in IE or Chrome may not be so well aligned in Firefox.
I know how to change default browsers, but the normal ways are clumsy and time consuming. There must be a way to make the changes via PowerShell or from the command line.  After all, isn't it really just a matter of registry settings?
Any help would be appreciated.
0
AdminAssociates
Asked:
AdminAssociates
  • 3
  • 3
  • 2
  • +1
1 Solution
 
Run5kCommented:
If you don't mind me saying so, I have never found that changing the default browser is particularly clumsy or time consuming.  Have you simply tried navigating to Start -> Default Programs -> Set your default programs during previous attempts?  You highlight your browser of choice and click the Set this program as default link.  Typically, less than ten seconds.

Conversely, maybe our script gurus are aware of a method that I haven't heard of before, but that seems like a rather elaborate way of accomplishing a relatively simple task.  Just my 2ยข-worth.
0
 
AdminAssociatesAuthor Commented:
I am not particularly skilled or experienced at creating web pages, however I enjoy it and want to learn more.
The WYSIWYG program I am using to create web pages allows you to preview the current set in the default browser. To do so in a different browser requires me to save the changes, publish them, close the program, change the default browser, reopen the program, reload the current set and then preview the changes I just made, and by then I have probably encountered a senior moment and lost focus. If I could simply run a script or batch file, or something from the command line to change the default browser, it would be oh so much more simple.
0
 
Run5kCommented:
Forgive me if I sound repetitive, but you didn't actually answer my question:  have you simply tried navigating to Start -> Default Programs -> Set your default programs during previous attempts?  My colleagues and I are prone to our own senior moments, but I must admit that I have never heard any of them describe that process as being overly time consuming.

Once again, I sincerely hope that one of the Experts Exchange script gurus has a method that I haven't utilize before to provide you with an ideal solution, but I'm not sure that it's quite that easy.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Darr247Commented:
Why not open a copy of the web page in each browser, then after making changes refresh the page in each one to see how the page actually looks?

i.e. being set as the default browser should not affect how the page displays in it.
0
 
AnuroopsunddCommented:
0
 
AdminAssociatesAuthor Commented:
This is what I had in mind. Thank you.
0
 
Darr247Commented:
That solution should not work for win7, so why was the question posted in the windows 7 topic area?
e.g. it showed a registry file for Win98 (or WinME) and IE6.
0
 
Run5kCommented:
Agreed.  We are always glad to help, but when we have devoted the time & effort towards helping you with your problem, it seems like it would simply be a professional courtesy to actually have our feedback questions answered.
0
 
AdminAssociatesAuthor Commented:
I do apologize. I didn't mean to slight anyone. And, I realize the solution was not completely applicable but it got me started down the right road. I monitored the WIN7 registry changes made when changing defaults from IE9 to FF to Chrome and wrote my own reg files.  They seem to work just fine and require a single click to change default browsers.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now