boyhong 发表于 2010-3-18 16:19:18

我要疯掉了(关于_IECreate启动不是IE默认浏览器)

#include <IE.au3>
&top=_IECreate("172.16.128.56")
.......

好家伙,若客户端安装了其它网页浏览器。_IECreate将启动了非IE的窗口,,我下边的操作无法进行。。

于是从网上找了很多资料:
使用如下注册表,但依然不管用:

Windows Registry Editor Version 5.00

;Sets IE as default (For use with Windows XP systems)
;Use this only if IE is installed in its default location
;c:\Program Files\Internet Explorer


@="URL:File Transfer Protocol"
"EditFlags"=dword:00000002
"ShellFolder"="{63da6ec0-2e98-11cf-8d82-444553540000}"
"Source Filter"="{E436EBB6-524F-11CE-9F53-0020AF0BA770}"
"URL Protocol"=""


@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,75,00,72,00,\
6c,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00


".IVF"="{C69E8F40-D5C8-11D0-A520-145405C10000}"


@="open"




@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" %1"


@="\"%1\",,-1,0,,,,"
"NoActivateHandler"=""


@="IExplore"


@="*"


@="WWW_OpenURL"


@="HTML Document"
"EditFlags"=dword:00010000
"BrowserFlags"=dword:00000008


@=""


@="{25336920-03F9-11CF-8FD0-00AA00686F13}"


@="C:\\Program Files\\Internet Explorer\\iexplore.exe,1"


@="{0CF774D0-F077-11D1-B1BC-00C04F86C324}"


@="opennew"


@="Open in S&ame Window"


@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" -nohome"


@="\"file://%1\",,-1,,,,,"
"NoActivateHandler"=""


@="IExplore"


@="WWW_OpenURL"


@="&Open"


@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" %1"


@="\"%1\",,-1,0,,,,"
"NoActivateHandler"=""


@="IExplore"


@="*"


@="WWW_OpenURLNewWindow"




@=hex(2):72,00,75,00,6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,\
00,20,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,\
25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,73,\
00,68,00,74,00,6d,00,6c,00,2e,00,64,00,6c,00,6c,00,2c,00,50,00,72,00,69,00,\
6e,00,74,00,48,00,54,00,4d,00,4c,00,20,00,22,00,25,00,31,00,22,00,20,00,22,\
00,25,00,32,00,22,00,20,00,22,00,25,00,33,00,22,00,20,00,22,00,25,00,34,00,\
22,00,00,00


@="URL:HyperText Transfer Protocol"
"EditFlags"=dword:00000002
"Source Filter"="{E436EBB6-524F-11CE-9F53-0020AF0BA770}"
"URL Protocol"=""


"."="dxmasf.dll,150"
".asf"="dxmasf.dll,150"
".asp"="dxmasf.dll,150"
".asx"="dxmasf.dll,150"
".nsc"="dxmasf.dll,150"
".wax"="dxmasf.dll,150"
".wm"="dxmasf.dll,150"
".wma"="dxmasf.dll,150"
".wmv"="dxmasf.dll,150"
".wmx"="dxmasf.dll,150"
".wvx"="dxmasf.dll,150"


@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,75,00,72,00,\
6c,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00


".ASF"="{6B6D0800-9ADA-11d0-A520-00A0D10129C0}"
".ASX"="{4B428940-263C-11d1-A520-000000000000}"
".ASP"="{4B428940-263C-11d1-A520-000000000000}"
".WAX"="{4B428940-263C-11d1-A520-000000000000}"
".WM"="{6B6D0800-9ADA-11d0-A520-00A0D10129C0}"
".WMA"="{6B6D0800-9ADA-11d0-A520-00A0D10129C0}"
".NSC"="{4B428940-263C-11d1-A520-000000000000}"
".BECK"="{6B6D0800-9ADA-11d0-A520-00A0D10129C0}"
".WVX"="{4B428940-263C-11d1-A520-000000000000}"
".WMV"="{6B6D0800-9ADA-11d0-A520-00A0D10129C0}"
".WMX"="{4B428940-263C-11d1-A520-000000000000}"
".IVF"="{C69E8F40-D5C8-11D0-A520-145405C10000}"


@="open"




@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" -nohome"


@="\"%1\",,-1,0,,,,"
"NoActivateHandler"=""


@="IExplore"


@="WWW_OpenURL"


@="URL:HyperText Transfer Protocol with Privacy"
"EditFlags"=dword:00000002
"Source Filter"="{E436EBB6-524F-11CE-9F53-0020AF0BA770}"
"BrowserFlags"=dword:00000008
"URL Protocol"=""


@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,75,00,72,00,\
6c,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00


@="open"




@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" -nohome"


@="\"%1\",,-1,0,,,,"
"NoActivateHandler"=""


@="IExplore"


@="WWW_OpenURL"


"EditFlags"=dword:00000002
@="Internet Shortcut"
"IsShortcut"=""
"NeverShowExt"=""


@="{FBF23B40-E3F0-101B-8488-00AA003E56F8}"


@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,75,00,72,00,\
6c,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00




"CLSID"="{FBF23B40-E3F0-101B-8488-00AA003E56F8}"
"LegacyDisable"=""


@="rundll32.exe shdocvw.dll,OpenURL %l"




@=hex(2):72,00,75,00,6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,\
00,20,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,\
25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4d,00,73,\
00,68,00,74,00,6d,00,6c,00,2e,00,64,00,6c,00,6c,00,2c,00,50,00,72,00,69,00,\
6e,00,74,00,48,00,54,00,4d,00,4c,00,20,00,22,00,25,00,31,00,22,00,00,00




@=hex(2):72,00,75,00,6e,00,64,00,6c,00,6c,00,33,00,32,00,2e,00,65,00,78,00,65,\
00,20,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,\
25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4d,00,73,\
00,68,00,74,00,6d,00,6c,00,2e,00,64,00,6c,00,6c,00,2c,00,50,00,72,00,69,00,\
6e,00,74,00,48,00,54,00,4d,00,4c,00,20,00,22,00,25,00,31,00,22,00,20,00,22,\
00,25,00,32,00,22,00,20,00,22,00,25,00,33,00,22,00,20,00,22,00,25,00,34,00,\
22,00,00,00






@=""


@="{FBF23B40-E3F0-101B-8488-00AA003E56F8}"


@="{FBF23B40-E3F0-101B-8488-00AA003E56F8}"




@=""


@="Internet Shortcut"


@="shdocvw.dll"
"ThreadingModel"="Apartment"
"LoadWithoutCOM"=""


@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"


@="InternetShortcut"




@=""


@="URL:Gopher Protocol"
"EditFlags"=dword:00000002
"Source Filter"="{E436EBB6-524F-11CE-9F53-0020AF0BA770}"
"URL Protocol"=""


@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,75,00,72,00,\
6c,00,2e,00,64,00,6c,00,6c,00,2c,00,30,00,00,00






@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" -nohome"


@="\"%1\",,-1,0,,,,"
"NoActivateHandler"=""


@="IExplore"


@="WWW_OpenURL"


@="MHTML Document"


@=""


@="{3050F3D9-98B5-11CF-BB82-00AA00BDCE0B}"


@="C:\\Program Files\\Internet Explorer\\iexplore.exe,22"


@="opennew"


@="Open in S&ame Window"


@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" -nohome"


@="\"file://%1\",,-1,,,,,"


@="IExplore"


@="WWW_OpenURL"


@="&Open"


@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" %1"


@="\"file://%1\",,-1,,,,,"
"NoActivateHandler"=""


@="IExplore"


@="*"


@="WWW_OpenURLNewWindow"


@="htmlfile"


@="htmlfile"


@="mhtmlfile"


@="mhtmlfile"

lynfr8 发表于 2010-3-18 21:49:21

ShellExecute("172.16.128.56")

lynfr8 发表于 2010-3-18 21:49:47

ShellExecute("172.16.128.56")

kxing 发表于 2010-3-19 00:38:08

可以直接运行ie源程序啊!
如:Run('"'&@ProgramFilesDir&'\Internet Explorer\IEXPLORE.EXE" http://autoitx.com/')

boyhong 发表于 2010-3-19 13:52:32

本帖最后由 boyhong 于 2010-3-19 14:07 编辑

可以直接运行ie源程序啊!
如:Run('"'&@ProgramFilesDir&'\Internet Explorer\IEXPLORE.EXE" )
kxing 发表于 2010-3-19 00:38 http://www.autoitx.com/images/common/back.gif

谢谢,不行的,因为然后我要接着用如下的UDF里更多功能:

例如:
#include <IE.au3>
$oIE = _IECreate("http://www.autoitscript.com")
$sMyString = "wallpaper"
$oLinks = _IELinkGetCollection($oIE)
等等等其它代码。。。。

boyhong 发表于 2010-3-19 13:55:29

ShellExecute("172.16.128.56")
lynfr8 发表于 2010-3-18 21:49 http://www.autoitx.com/images/common/back.gif

谢谢您的出手。
&top=_IECreate("172.16.128.56")
是为了用更多。。。#include <IE.au3>里的功能。

接着求助。。。

lynfr8 发表于 2010-3-19 14:14:30

谢谢您的出手。
&top=_IECreate("172.16.128.56")
是为了用更多。。。#include 里的功能。

接着求 ...
boyhong 发表于 2010-3-19 13:55 http://www.autoitx.com/images/common/back.gif

试试ShellExecute或Run打开网页后
_IEAttach 得到对象变量以后就可以使用IE.au3的其它函数
例子:#include <IE.au3>
Run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE www.baidu.com")
sleep(8000) ;等待IE启动
$oIE = _IEAttach ("百度" )
$sText = _IEBodyReadText ($oIE)
MsgBox(0, "Body Text", $sText)

boyhong 发表于 2010-3-19 14:25:17

本帖最后由 boyhong 于 2010-3-19 14:28 编辑

试试ShellExecute或Run打开网页后
_IEAttach 得到对象变量以后就可以使用IE.au3的其它函数
例子:
lynfr8 发表于 2010-3-19 14:14 http://www.autoitx.com/images/common/back.gif

无比感谢。实话跟您说,我们公司有个信息系统,仅支持IE下的完美运行,不支持其它浏览器。
公司客户端使用的火狐等等默认,IE版的版本,语言,系统,等等很乱。。
我一直想通过AU3寻找一个能达到如下效果:
http://hi.baidu.com/boyhong/blog/item/4428e55031821d571138c207.html

经过测试,按上手工设置后,所有的都完美运行,不管他的IE是英文版,是7还是8,打开任何信息系统的页面。都可以运行。

boyhong 发表于 2010-3-19 14:32:05

我试着在看msdn,看看有无突破找到IE方面的COM接口之类设置一下,英文太差,真遭罪。。哎~~~

rikthhpgf2005 发表于 2010-3-19 14:32:19

复杂化了:face (14):

lynfr8 发表于 2010-3-19 14:35:53

回复 8# boyhong

boyhong 发表于 2010-3-19 14:41:03

回复boyhong
lynfr8 发表于 2010-3-19 14:35 http://www.autoitx.com/images/common/back.gif

感谢提供一条思路试验它。
我正在虚拟机对注册表做快照对比:
   启用对此程序的访问前边的勾是哪条注册表在控制. 一会儿就有结果。
同时希望能其它或者更多个游览器也适用。。。

另:我在看:http://msdn.microsoft.com/en-us/library/aa752084(VS.85).aspx
发现自己根本看不懂。

boyhong 发表于 2010-3-19 14:47:31

回复 11# lynfr8

经测试,您强调的遨游后边的那个勾无论去不去,不影响:_IECreate启动默认IE.

lynfr8 发表于 2010-3-19 14:51:54

你试试在打开遨游的情况下按照你8楼方法设置
结果是依然在遨游新标签打开
如果关闭了遨游就没问题
至于恢复IE为默认浏览器
注入下面附件注册表即可

boyhong 发表于 2010-3-19 15:10:29

经过测试,用了您的默认浏览器toIE.reg ,_IECreate还是使用傲游打开。狂汗。。。也不知这个完美者的傲游在封装的时候改了哪儿!!!!!哎~~~
页: [1] 2
查看完整版本: 我要疯掉了(关于_IECreate启动不是IE默认浏览器)