Windows Internet 快捷方式:从 IE 开始最大化?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/460136/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Windows internet shortcuts: starting with IE maximized?
提问by Jacob
I have an internet shortcut on my desktop, with the contents looking like this:
我的桌面上有一个 Internet 快捷方式,其内容如下所示:
[InternetShortcut]
URL=http://www.microsoft.com/isapi/redir.dll?prd=ie&pver=6&ar=IStart
Modified=D03458CE7738C801A2
I was wondering if there are any tweaks I can do to guarantee that the browser starts maximized after someone loads the link.
我想知道是否有任何调整可以确保在有人加载链接后浏览器启动最大化。
Thanks!
谢谢!
回答by Xn0vv3r
In short:You can't guarantee that the browser starts maximized from one special internet link. Either all or none internet links start maximized.
简而言之:您不能保证浏览器从一个特殊的互联网链接开始最大化。全部或没有互联网链接开始最大化。
But: Someone had a similar problem than this. Check this, if it helps you.
但是:有人遇到了类似的问题。检查这个,如果它对你有帮助。
Edit: owhowho I've found something really dirty, I think you shouldn't use this, but... here it is. Replace your second line with the following:
编辑:owhowho 我发现了一些非常脏的东西,我认为你不应该使用它,但是......它就在这里。用以下内容替换第二行:
URL=javascript:window.moveTo(0,0);window.resizeTo(screen.width,screen.height);window.location.href="http://www.microsoft.com/isapi/redir.dll?prd=ie&pver=6&ar=IStart";
It doesn't make the window really maximized, but makes the browserwindow the maximum height and width.
它并没有真正使窗口最大化,而是使浏览器窗口的高度和宽度达到最大。
回答by dasony
Rather than using a internet shortcut (.url), create a shortcut (.lnk)to internet explorer. (iexplore.exe) You can set the initial windows state in lnk file. (Right-click the icon and see properties.)
不要使用 Internet 快捷方式(.url),而是创建一个指向 Internet Explorer的快捷方式(.lnk)。(iexplore.exe) 您可以在 lnk 文件中设置初始窗口状态。(右键单击该图标并查看属性。)
You can give an URL as an argument. The target would be something like
"%programfiles%\Internet Explorer\iexplore.exe" http://reddit.com
您可以提供一个 URL 作为参数。目标将是这样的
"%programfiles%\Internet Explorer\iexplore.exe" http://reddit.com
This is okay when you are using this only in your computer. This is not a general solution. If you want to do this programatically, there are some windows API's related to creating a shortcut. You will also have to get an path of internet explorer from the registry, as it can vary. Some users might not have IE.
当您仅在计算机中使用它时,这是可以的。这不是通用的解决方案。如果您想以编程方式执行此操作,则有一些与创建快捷方式相关的 Windows API。您还必须从注册表中获取 Internet Explorer 的路径,因为它可能会有所不同。有些用户可能没有 IE。
回答by dasony
i think that it is a guarantee that the internet explorer will start unless the system is down. even if one gets the default window, from there it is very easy for you to set the browser to what you want.
我认为除非系统关闭,否则 Internet Explorer 将启动。即使获得了默认窗口,您也可以很容易地将浏览器设置为您想要的。
回答by Riho
I think IE remembers how it was opened last time and then uses those settings. You might find this info from Registry and use it, but I doubpt that it was implemented to get the values from startup arguments
我认为 IE 会记住上次打开它的方式,然后使用这些设置。您可能会从 Registry 中找到此信息并使用它,但我怀疑它是否已实现以从启动参数中获取值
回答by MSalters
You're jumping quite quickly to conclusions here. I don't think you can even guarantee that Internet Explorer will start at all; you will get whatever the user set as his default browser.
你在这里很快就得出结论。我认为您甚至不能保证 Internet Explorer 会启动;您将获得用户设置为其默认浏览器的任何内容。