找回密码
 加入
搜索
查看: 12295|回复: 23

[系统综合] 我要疯掉了(关于_IECreate启动不是IE默认浏览器)

 火.. [复制链接]
发表于 2010-3-18 16:19:18 | 显示全部楼层 |阅读模式
#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

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

[HKEY_CLASSES_ROOT\ftp\DefaultIcon]
@=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

[HKEY_CLASSES_ROOT\ftp\Extensions]
".IVF"="{C69E8F40-D5C8-11D0-A520-145405C10000}"

[HKEY_CLASSES_ROOT\ftp\shell]
@="open"

[HKEY_CLASSES_ROOT\ftp\shell\open]

[HKEY_CLASSES_ROOT\ftp\shell\open\command]
@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" %1"

[HKEY_CLASSES_ROOT\ftp\shell\open\ddeexec]
@="\"%1\",,-1,0,,,,"
"NoActivateHandler"=""

[HKEY_CLASSES_ROOT\ftp\shell\open\ddeexec\Application]
@="IExplore"

[HKEY_CLASSES_ROOT\ftp\shell\open\ddeexec\ifExec]
@="*"

[HKEY_CLASSES_ROOT\ftp\shell\open\ddeexec\Topic]
@="WWW_OpenURL"

[HKEY_CLASSES_ROOT\htmlfile]
@="HTML Document"
"EditFlags"=dword:00010000
"BrowserFlags"=dword:00000008

[HKEY_CLASSES_ROOT\htmlfile\BrowseInPlace]
@=""

[HKEY_CLASSES_ROOT\htmlfile\CLSID]
@="{25336920-03F9-11CF-8FD0-00AA00686F13}"

[HKEY_CLASSES_ROOT\htmlfile\DefaultIcon]
@="C:\\Program Files\\Internet Explorer\\iexplore.exe,1"

[HKEY_CLASSES_ROOT\htmlfile\ScriptHostEncode]
@="{0CF774D0-F077-11D1-B1BC-00C04F86C324}"

[HKEY_CLASSES_ROOT\htmlfile\shell]
@="opennew"

[HKEY_CLASSES_ROOT\htmlfile\shell\open]
@="Open in S&ame Window"

[HKEY_CLASSES_ROOT\htmlfile\shell\open\command]
@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" -nohome"

[HKEY_CLASSES_ROOT\htmlfile\shell\open\ddeexec]
@="\"file://%1\",,-1,,,,,"
"NoActivateHandler"=""

[HKEY_CLASSES_ROOT\htmlfile\shell\open\ddeexec\Application]
@="IExplore"

[HKEY_CLASSES_ROOT\htmlfile\shell\open\ddeexec\Topic]
@="WWW_OpenURL"

[HKEY_CLASSES_ROOT\htmlfile\shell\opennew]
@="&Open"

[HKEY_CLASSES_ROOT\htmlfile\shell\opennew\command]
@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" %1"

[HKEY_CLASSES_ROOT\htmlfile\shell\opennew\ddeexec]
@="\"%1\",,-1,0,,,,"
"NoActivateHandler"=""

[HKEY_CLASSES_ROOT\htmlfile\shell\opennew\ddeexec\Application]
@="IExplore"

[HKEY_CLASSES_ROOT\htmlfile\shell\opennew\ddeexec\IfExec]
@="*"

[HKEY_CLASSES_ROOT\htmlfile\shell\opennew\ddeexec\Topic]
@="WWW_OpenURLNewWindow"

[HKEY_CLASSES_ROOT\htmlfile\shell\printto]

[HKEY_CLASSES_ROOT\htmlfile\shell\printto\command]
@=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

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

[HKEY_CLASSES_ROOT\HTTP\AnimExtensions]
"."="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"

[HKEY_CLASSES_ROOT\HTTP\DefaultIcon]
@=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

[HKEY_CLASSES_ROOT\HTTP\Extensions]
".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}"

[HKEY_CLASSES_ROOT\HTTP\shell]
@="open"

[HKEY_CLASSES_ROOT\HTTP\shell\open]

[HKEY_CLASSES_ROOT\HTTP\shell\open\command]
@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" -nohome"

[HKEY_CLASSES_ROOT\HTTP\shell\open\ddeexec]
@="\"%1\",,-1,0,,,,"
"NoActivateHandler"=""

[HKEY_CLASSES_ROOT\HTTP\shell\open\ddeexec\Application]
@="IExplore"

[HKEY_CLASSES_ROOT\HTTP\shell\open\ddeexec\Topic]
@="WWW_OpenURL"

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

[HKEY_CLASSES_ROOT\https\DefaultIcon]
@=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

[HKEY_CLASSES_ROOT\https\shell]
@="open"

[HKEY_CLASSES_ROOT\https\shell\open]

[HKEY_CLASSES_ROOT\https\shell\open\command]
@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" -nohome"

[HKEY_CLASSES_ROOT\https\shell\open\ddeexec]
@="\"%1\",,-1,0,,,,"
"NoActivateHandler"=""

[HKEY_CLASSES_ROOT\https\shell\open\ddeexec\Application]
@="IExplore"

[HKEY_CLASSES_ROOT\https\shell\open\ddeexec\Topic]
@="WWW_OpenURL"

[HKEY_CLASSES_ROOT\InternetShortcut]
"EditFlags"=dword:00000002
@="Internet Shortcut"
"IsShortcut"=""
"NeverShowExt"=""

[HKEY_CLASSES_ROOT\InternetShortcut\CLSID]
@="{FBF23B40-E3F0-101B-8488-00AA003E56F8}"

[HKEY_CLASSES_ROOT\InternetShortcut\DefaultIcon]
@=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

[HKEY_CLASSES_ROOT\InternetShortcut\shell]

[HKEY_CLASSES_ROOT\InternetShortcut\shell\open]
"CLSID"="{FBF23B40-E3F0-101B-8488-00AA003E56F8}"
"LegacyDisable"=""

[HKEY_CLASSES_ROOT\InternetShortcut\shell\open\command]
@="rundll32.exe shdocvw.dll,OpenURL %l"

[HKEY_CLASSES_ROOT\InternetShortcut\shell\print]

[HKEY_CLASSES_ROOT\InternetShortcut\shell\print\command]
@=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

[HKEY_CLASSES_ROOT\InternetShortcut\shell\printto]

[HKEY_CLASSES_ROOT\InternetShortcut\shell\printto\command]
@=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

[HKEY_CLASSES_ROOT\InternetShortcut\shellex]

[HKEY_CLASSES_ROOT\InternetShortcut\shellex\ContextMenuHandlers]

[HKEY_CLASSES_ROOT\InternetShortcut\shellex\ContextMenuHandlers\{FBF23B40-E3F0-101B-8488-00AA003E56F8}]
@=""

[HKEY_CLASSES_ROOT\InternetShortcut\shellex\IconHandler]
@="{FBF23B40-E3F0-101B-8488-00AA003E56F8}"

[HKEY_CLASSES_ROOT\InternetShortcut\shellex\PropertyHandler]
@="{FBF23B40-E3F0-101B-8488-00AA003E56F8}"

[HKEY_CLASSES_ROOT\InternetShortcut\shellex\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\InternetShortcut\shellex\PropertySheetHandlers\{FBF23B40-E3F0-101B-8488-00AA003E56F8}]
@=""

[HKEY_CLASSES_ROOT\CLSID\{FBF23B40-E3F0-101B-8488-00AA003E56F8}]
@="Internet Shortcut"

[HKEY_CLASSES_ROOT\CLSID\{FBF23B40-E3F0-101B-8488-00AA003E56F8}\InProcServer32]
@="shdocvw.dll"
"ThreadingModel"="Apartment"
"LoadWithoutCOM"=""

[HKEY_CLASSES_ROOT\CLSID\{FBF23B40-E3F0-101B-8488-00AA003E56F8}\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\CLSID\{FBF23B40-E3F0-101B-8488-00AA003E56F8}\ProgID]
@="InternetShortcut"

[HKEY_CLASSES_ROOT\CLSID\{FBF23B40-E3F0-101B-8488-00AA003E56F8}\shellex]

[HKEY_CLASSES_ROOT\CLSID\{FBF23B40-E3F0-101B-8488-00AA003E56F8}\shellex\MayChangeDefaultMenu]
@=""

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

[HKEY_CLASSES_ROOT\gopher\DefaultIcon]
@=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

[HKEY_CLASSES_ROOT\gopher\shell]

[HKEY_CLASSES_ROOT\gopher\shell\open]

[HKEY_CLASSES_ROOT\gopher\shell\open\command]
@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" -nohome"

[HKEY_CLASSES_ROOT\gopher\shell\open\ddeexec]
@="\"%1\",,-1,0,,,,"
"NoActivateHandler"=""

[HKEY_CLASSES_ROOT\gopher\shell\open\ddeexec\Application]
@="IExplore"

[HKEY_CLASSES_ROOT\gopher\shell\open\ddeexec\Topic]
@="WWW_OpenURL"

[HKEY_CLASSES_ROOT\mhtmlfile]
@="MHTML Document"

[HKEY_CLASSES_ROOT\mhtmlfile\BrowseInPlace]
@=""

[HKEY_CLASSES_ROOT\mhtmlfile\CLSID]
@="{3050F3D9-98B5-11CF-BB82-00AA00BDCE0B}"

[HKEY_CLASSES_ROOT\mhtmlfile\DefaultIcon]
@="C:\\Program Files\\Internet Explorer\\iexplore.exe,22"

[HKEY_CLASSES_ROOT\mhtmlfile\shell]
@="opennew"

[HKEY_CLASSES_ROOT\mhtmlfile\shell\open]
@="Open in S&ame Window"

[HKEY_CLASSES_ROOT\mhtmlfile\shell\open\command]
@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" -nohome"

[HKEY_CLASSES_ROOT\mhtmlfile\shell\open\ddeexec]
@="\"file://%1\",,-1,,,,,"

[HKEY_CLASSES_ROOT\mhtmlfile\shell\open\ddeexec\Application]
@="IExplore"

[HKEY_CLASSES_ROOT\mhtmlfile\shell\open\ddeexec\Topic]
@="WWW_OpenURL"

[HKEY_CLASSES_ROOT\mhtmlfile\shell\opennew]
@="&Open"

[HKEY_CLASSES_ROOT\mhtmlfile\shell\opennew\command]
@="\"C:\\Program Files\\Internet Explorer\\iexplore.exe\" %1"

[HKEY_CLASSES_ROOT\mhtmlfile\shell\opennew\ddeexec]
@="\"file://%1\",,-1,,,,,"
"NoActivateHandler"=""

[HKEY_CLASSES_ROOT\mhtmlfile\shell\opennew\ddeexec\Application]
@="IExplore"

[HKEY_CLASSES_ROOT\mhtmlfile\shell\opennew\ddeexec\IfExec]
@="*"

[HKEY_CLASSES_ROOT\mhtmlfile\shell\opennew\ddeexec\Topic]
@="WWW_OpenURLNewWindow"

[HKEY_CLASSES_ROOT\.htm]
@="htmlfile"

[HKEY_CLASSES_ROOT\.html]
@="htmlfile"

[HKEY_CLASSES_ROOT\.mht]
@="mhtmlfile"

[HKEY_CLASSES_ROOT\.mhtml]
@="mhtmlfile"
发表于 2010-3-18 21:49:21 | 显示全部楼层
ShellExecute("172.16.128.56")
发表于 2010-3-18 21:49:47 | 显示全部楼层
ShellExecute("172.16.128.56")
发表于 2010-3-19 00:38:08 | 显示全部楼层
可以直接运行ie源程序啊!
如:Run('"'&@ProgramFilesDir&'\Internet Explorer\IEXPLORE.EXE" http://autoitx.com/')
 楼主| 发表于 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


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

例如:
#include <IE.au3>
$oIE = _IECreate("http://www.autoitscript.com")
$sMyString = "wallpaper"
$oLinks = _IELinkGetCollection($oIE)
等等等其它代码。。。。
 楼主| 发表于 2010-3-19 13:55:29 | 显示全部楼层
ShellExecute("172.16.128.56")
lynfr8 发表于 2010-3-18 21:49


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

接着求助。。。
发表于 2010-3-19 14:14:30 | 显示全部楼层
谢谢您的出手。
&top=_IECreate("172.16.128.56")
是为了用更多。。。#include 里的功能。

接着求 ...
boyhong 发表于 2010-3-19 13:55


试试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)
 楼主| 发表于 2010-3-19 14:25:17 | 显示全部楼层
本帖最后由 boyhong 于 2010-3-19 14:28 编辑
试试ShellExecute或Run打开网页后
_IEAttach 得到对象变量以后就可以使用IE.au3的其它函数
例子:
lynfr8 发表于 2010-3-19 14:14


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

经过测试,按上手工设置后,所有的都完美运行,不管他的IE是英文版,是7还是8,打开任何信息系统的页面。都可以运行。
 楼主| 发表于 2010-3-19 14:32:05 | 显示全部楼层
我试着在看msdn,看看有无突破找到IE方面的COM接口之类设置一下,英文太差,真遭罪。。哎~~~
发表于 2010-3-19 14:32:19 | 显示全部楼层
复杂化了
发表于 2010-3-19 14:35:53 | 显示全部楼层
回复 8# boyhong

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2010-3-19 14:41:03 | 显示全部楼层
回复  boyhong
lynfr8 发表于 2010-3-19 14:35


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

另:我在看:http://msdn.microsoft.com/en-us/library/aa752084(VS.85).aspx
发现自己根本看不懂。
 楼主| 发表于 2010-3-19 14:47:31 | 显示全部楼层
回复 11# lynfr8

经测试,您强调的遨游后边的那个勾无论去不去,不影响:_IECreate启动默认IE.
发表于 2010-3-19 14:51:54 | 显示全部楼层
你试试在打开遨游的情况下按照你8楼方法设置
结果是依然在遨游新标签打开
如果关闭了遨游就没问题
至于恢复IE为默认浏览器
注入下面附件注册表即可

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2010-3-19 15:10:29 | 显示全部楼层
经过测试,用了您的默认浏览器toIE.reg ,_IECreate还是使用傲游打开。狂汗。。。也不知这个完美者的傲游在封装的时候改了哪儿!!!!!哎~~~
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-13 18:41 , Processed in 0.095252 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表