声明:本空间的内容不全部是原创,如有雷同只为学习与借鉴之方便,别无它意,来者是朋友,愿通过此平台结交天下测试达狼!

QTP 调试时提示ActiceX部件不能创建对象

上一篇 / 下一篇  2010-07-18 21:12:58 / 个人分类:QTP

ug.h U&XOe0@M0QTP运行下列脚本 提示:ActiceX部件不能创建对象

Fe/G4ucsZ O051Testing软件测试网U:p3k4@I Z,f,s

Dim ExcelSheet51Testing软件测试网fQG7axfg&p:c
Set ExcelSheet = CreateObject("Excel.Sheet")
KQonC0' Make Excel visible through the Application object.
G^3s!c6po(O0ExcelSheet.Application.Visible = True
.\(C{]gcI/[E0' Place some text in the first cell of the sheet.
3C ny8m{)y0ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1"51Testing软件测试网.eQ%BP'?E
' Save the sheet.51Testing软件测试网$i3Q^ c}PC6U:{vM
ExcelSheet.SaveAs "C:\DOCS\TEST.XLS"
/K r#nLXq i?*?)Cee0' Close Excel with the Quit method on the Application object.51Testing软件测试网Yn d ]:gm oZG$IO
ExcelSheet.Application.Quit
m4U Nd!GDy.t0' Release the object variable.51Testing软件测试网 ?}}4K'NN%Xh!J
Set ExcelSheet = Nothing51Testing软件测试网$nfeA-lN
51Testing软件测试网e-[ IR!F1q @7\

51Testing软件测试网2Ts? R l'q

在网上找过几个方法

7V:R,NOY*e j2c%w051Testing软件测试网 v;V_ AJ]]

1)把下列放入记事本,并把后缀改成bat格式51Testing软件测试网ilV&lB+|e$O

]K`3sX9~/w ~6k0rundll32.exe advpack.dll /DelNodeRunDLL32 %systemroot%\System32\dacui.dll

*Id)yQ;t)k+L0

X4HNC(P,v0rundll32.exe advpack.dll /DelNodeRunDLL32 %systemroot%\Catroot\icatalog.mdb
S@j7J,? a M0regsvr32 /s comcat.dll51Testing软件测试网 x;B;bX1J3pQ
regsvr32 /s asctrls.ocx51Testing软件测试网kpU)TrO;ri-m P
regsvr32 /s oleaut32.dll
!\r u8S+f0regsvr32 /s shdocvw.dll /I
.yM!G/?'XGT0regsvr32 /s shdocvw.dll
R(c8bg-g0regsvr32 /s browseui.dll
U)Z P0~u&O0regsvr32 /s browseui.dll /I
7W.S3~L*|?0regsvr32 /s msrating.dll51Testing软件测试网%w G ZE|v+y
regsvr32 /s mlang.dll
L6NL'JHS0regsvr32 /s hlink.dll
U\ekaQB3Ln0regsvr32 /s mshtml.dll51Testing软件测试网0v!r&O|.^3`
regsvr32 /s mshtmled.dll51Testing软件测试网 i nB$^\&j+H%ll
regsvr32 /s urlmon.dll51Testing软件测试网.RA KTma4H5T|
regsvr32 /s plugin.ocx
w4E z@s&C2L0regsvr32 /s sendmail.dll
g6j-X/xN2L e7k? sn0regsvr32 /s mshtml.dll /i
r F5`~n#j e:A0regsvr32 /s scrobj.dll51Testing软件测试网H`;I%@[M8u
regsvr32 /s corpol.dll51Testing软件测试网2Vli!]'Ai4noM
regsvr32 /s jscript.dll51Testing软件测试网Q5e+?/O7Ay7~
regsvr32 /s msxml.dll
l8f3U2F7g"SH)W0regsvr32 /s imgutil.dll51Testing软件测试网:i O G'sMFC2G
regsvr32 /s cryptext.dll
*F ~6UR6c:k'\Q0regsvr32 /s inseng.dll
d k%vE'Q0regsvr32 /s iesetup.dll /i51Testing软件测试网]3X |B|]{*I-u;H
regsvr32 /s cryptdlg.dll51Testing软件测试网o `:r)n;A8s }-Jdt
regsvr32 /s actxprxy.dll51Testing软件测试网,E}Tzs|
regsvr32 /s dispex.dll51Testing软件测试网c8T ?-Ko!E
regsvr32 /s occache.dll51Testing软件测试网~[,uj~ll
regsvr32 /s iepeers.dll
ciFHo aeTH)d0regsvr32 /s urlmon.dll /i
"vw#z b:V)h0regsvr32 /s cdfview.dll
n3Mi8Q*x2op1aD$`*t*w L0regsvr32 /s webcheck.dll
!eU x%D!fxe,u0regsvr32 /s mobsync.dll
']H;e*W6sT8Q3g0regsvr32 /s pngfilt.dll
0v-Q4r:{nX C0regsvr32 /s licmgr10.dll
"zQ0WR{j[9M0regsvr32 /s hhctrl.ocx51Testing软件测试网7yP2Y]u:@!x+zz
regsvr32 /s inetcfg.dll
!Fd#P0A0m*V7v6A0regsvr32 /s trialoc.dll
YX&@ig&v0regsvr32 /s tdc.ocx51Testing软件测试网yNh O i hf ?)U0d
regsvr32 /s MSR2C.DLL51Testing软件测试网{.[Nu'{)j
regsvr32 /s msident.dll51Testing软件测试网uxEkm@
regsvr32 /s msieftp.dll
:z,I;xS7O M0regsvr32 /s xmsconf.ocx
3hI[#D"[;L0regsvr32 /s ils.dll
}$NWE;L(IL u0regsvr32 /s msoeacct.dll51Testing软件测试网-E"B^#O?]7yi-j
regsvr32 /s wab32.dll51Testing软件测试网6W5?C?]8]rC
regsvr32 /s wabimp.dll51Testing软件测试网.F U$w+D m6K
regsvr32 /s wabfind.dll51Testing软件测试网E5~*At3~y(E'hDV
regsvr32 /s oemiglib.dll
y4z d)p2C6e5J~0regsvr32 /s directdb.dll
s/cGZd*t0regsvr32 /s inetcomm.dll51Testing软件测试网'j(g$DZ]O"@'Wb
regsvr32 /s msoe.dll51Testing软件测试网f`i%R5y t |WmVY
regsvr32 /s oeimport.dll51Testing软件测试网 k/p6s(R1a9]:fg3[
regsvr32 /s msdxm.ocx51Testing软件测试网#G$Kr$O@s Vf"MG
regsvr32 /s dxmasf.dll51Testing软件测试网:q4kv[ r"E8k
regsvr32 /s laprxy.dll
3uyow1I0regsvr32 /s l3codecx.ax51Testing软件测试网7xJQY~c
regsvr32 /s acelpdec.ax51Testing软件测试网({!OjER
regsvr32 /s mpg4ds32.ax51Testing软件测试网/?i#Y:c1~
regsvr32 /s danim.dll
cK1[fZ(~p0regsvr32 /s Daxctle.ocx51Testing软件测试网*l5R] N@5l.q5h)a
regsvr32 /s lmrt.dll51Testing软件测试网!lLP.b_Sy
regsvr32 /s datime.dll51Testing软件测试网"q`o9d!RD
regsvr32 /s dxtrans.dll
5@? d5m#h&i0regsvr32 /s dxtmsft.dll
m#Fy;A S a8DG0regsvr32 /s wshom.ocx
Di'aD3M^0regsvr32 /s wshext.dll51Testing软件测试网/FZ[L+Nrg9c3W
regsvr32 /s vbscript.dll51Testing软件测试网8b+I9nn@hq
regsvr32 /s scrrun.dll mstinit.exe /setup
ew eCW$M&N5M^0regsvr32 /s msnsspc.dll /SspcCreateSspiReg51Testing软件测试网{(@D#]l
regsvr32 /s msapsspc.dll /SspcCreateSspiReg
&yI+H6[E"So6u }0echo.
,~A#{,zf0echo.51Testing软件测试网H~$^uxEM'IH

51Testing软件测试网Uvi4a`x(YVC

2)运行regsvr32 scrrun.dll

%HySP(pd0k*tl051Testing软件测试网!Gr Klvi*m

3)IE-工具-选项-安全-自定义级别-启用所有ActiceX控件或插件

8ZeV'^6X051Testing软件测试网8_4{b;[.hJL

都不管用, 哪位高人有更好方法?

qO L2j$Aw0

TAG:

haven6 引用 删除 haven6   /   2010-07-21 13:12:09
问题解决:
ActiveX component can't create object
See Also
Using VBScript with Objects
The VBScript 5.5 runtime could not instantiate the object for you because the object's class is not registered in the system registry, or one or more of the associated dynamic-link libraries (DLLs) are not available. Alternately, a DLL required by the object may be unusable, either because it can't be found, or it is corrupted.

To correct this error

Make sure all associated DLLs are available. For example, the Data Access Object (DAO) requires supporting DLLs that vary among platforms. You may have to rerun the setup program for such an object.
Internet Explorer may be trying to create an object for you, but you do not have the correct security permissions set in Internet Explorer. Reset the Internet Explorer security setting and try again.
See Also
 

评分:0

我来说两句

Open Toolbar