打开默认浏览器,而不从命令行指定URL [英] Open the default browser without specifying a URL from command line

查看:176
本文介绍了打开默认浏览器,而不从命令行指定URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要能够在Windows中打开默认浏览器,而不指定URL,以便打开用户的主页。  我只能找到指定< g class =" gr_ gr_91 gr-alert gr_gramm gr_run_anim gr_inline_cards
Grammar multiReplace"数据-GR-ID =" 91" id =" 91">一个网址,< / g>喜欢"start [url]"。  我需要能够从Windows 7及更高版本,从命令行执行此操作(最好不要编译二进制文件)。  这可能是
吗?

I need to be able to open the default browser in Windows, without specifying the URL, so that it opens the user's homepage.  I have been only able to find solutions that specify <g class="gr_ gr_91 gr-alert gr_gramm gr_run_anim gr_inline_cards Grammar multiReplace" data-gr-id="91" id="91">a URL,</g> like "start [url]".  I need to be able to do this from Windows 7 and up, from the command line (preferably without compiling a binary).  Is this possible?

推荐答案

嗨Isaac Hanson,

Hi Isaac Hanson,

感谢您在此发帖。

也许您可以构建程序来运行默认浏览器并从命令行运行该应用程序。

Maybe you can build the program to run the default browser and run the application from the command line.

如果您使用的是C#语言,你可以使用下面的代码:

If you are using the C# language, you could use the code below:

System.Diagnostics.Process.Start("http://google.com");


 

最好的问候,

 

Best Regards,

Hart


这篇关于打开默认浏览器,而不从命令行指定URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆