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

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

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

\ g0A;NM#Gb$MS0QTP运行下列脚本 提示:ActiceX部件不能创建对象

.K+l;fp]FE(X})@051Testing软件测试网nRk1w.z

Dim ExcelSheet
6Xjj{!A~!y iI0Set ExcelSheet = CreateObject("Excel.Sheet")51Testing软件测试网Iy%Uw{ MF H
' Make Excel visible through the Application object.
e-`_ |4_,[^0ExcelSheet.Application.Visible = True
pbY']^)]5H1A_Iuv*I0' Place some text in the first cell of the sheet.51Testing软件测试网)q1@/Rb-C
ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1"
5A0Y|"ua8PXT0' Save the sheet.51Testing软件测试网,bB+c"k6E q5[]Z
ExcelSheet.SaveAs "C:\DOCS\TEST.XLS"51Testing软件测试网.ko&rC]$k.U3p
' Close Excel with the Quit method on the Application object.51Testing软件测试网"y^ I H_&T j&B [(a
ExcelSheet.Application.Quit
/a"qI*^ T;A:Am U0' Release the object variable.51Testing软件测试网y#u UC6H[*n
Set ExcelSheet = Nothing51Testing软件测试网;r(nR[[r

/FB-^k/yj8yPM0

K JRX$D0E&Q0在网上找过几个方法51Testing软件测试网j7SW4QwBurO

esN6^3j'ghz R01)把下列放入记事本,并把后缀改成bat格式51Testing软件测试网 f4X(Pr s sX }

51Testing软件测试网'FBc9k8tJ

rundll32.exe advpack.dll /DelNodeRunDLL32 %systemroot%\System32\dacui.dll

7D!{wor J3Q0

;fKE!c%Eq0rundll32.exe advpack.dll /DelNodeRunDLL32 %systemroot%\Catroot\icatalog.mdb
$A2L4]3o/R4K.r#B0regsvr32 /s comcat.dll51Testing软件测试网{&j#m(G4DR
regsvr32 /s asctrls.ocx51Testing软件测试网#J`1q7` a|
regsvr32 /s oleaut32.dll51Testing软件测试网fq:c8JH
regsvr32 /s shdocvw.dll /I51Testing软件测试网6j3@$[m"sd_ Ow
regsvr32 /s shdocvw.dll
0A7w4kbJ!l4YwR0regsvr32 /s browseui.dll
$[%y:px:f$d6u0Z0regsvr32 /s browseui.dll /I51Testing软件测试网6W;\;h(gB Pyh.^
regsvr32 /s msrating.dll51Testing软件测试网'EAN(S"f q6FUZ:G
regsvr32 /s mlang.dll51Testing软件测试网0B]4o r$V_ ^-K O
regsvr32 /s hlink.dll51Testing软件测试网dK}])hJC+B|
regsvr32 /s mshtml.dll51Testing软件测试网OL$d/_5I S.sCm
regsvr32 /s mshtmled.dll51Testing软件测试网1R2B,w,d"oZ
regsvr32 /s urlmon.dll51Testing软件测试网T\L;kb9d.|6Q/rF
regsvr32 /s plugin.ocx
Ey+QSJk"I0regsvr32 /s sendmail.dll
B'X+Ow9iG,_i0regsvr32 /s mshtml.dll /i51Testing软件测试网rSH8M2u'c|T
regsvr32 /s scrobj.dll51Testing软件测试网&WMyxZ&aH
regsvr32 /s corpol.dll
&muL0X;b.US0regsvr32 /s jscript.dll51Testing软件测试网7@d|vR%RJ7Z6N#M7y"G
regsvr32 /s msxml.dll51Testing软件测试网Dq%P.O OWs*c0\
regsvr32 /s imgutil.dll51Testing软件测试网C1~Qng8\:v6w `
regsvr32 /s cryptext.dll
$R~E6o8~0regsvr32 /s inseng.dll51Testing软件测试网 P,DTS |
regsvr32 /s iesetup.dll /i51Testing软件测试网:D7SBlO|
regsvr32 /s cryptdlg.dll51Testing软件测试网,S8Lluv+g:r!ko;E
regsvr32 /s actxprxy.dll
"P1v%\n VU s8\c0regsvr32 /s dispex.dll51Testing软件测试网l.dM3yp s/Lf:Ne i
regsvr32 /s occache.dll51Testing软件测试网:[,Ns:v?;E
regsvr32 /s iepeers.dll51Testing软件测试网{~Hxq#tT qq
regsvr32 /s urlmon.dll /i51Testing软件测试网5K]U*P'W3z|,q.q uu
regsvr32 /s cdfview.dll
;c1R4}(W4D(Oh0regsvr32 /s webcheck.dll51Testing软件测试网.k/G s?xZ!X$e
regsvr32 /s mobsync.dll51Testing软件测试网 S7l@Z(CS\XN
regsvr32 /s pngfilt.dll
S.I1t|I0regsvr32 /s licmgr10.dll51Testing软件测试网7C"N7Qn2Hw5U8ag9V
regsvr32 /s hhctrl.ocx51Testing软件测试网bV XV{;[(`0a1cZ+l
regsvr32 /s inetcfg.dll51Testing软件测试网u+W$x"e3J`%v
regsvr32 /s trialoc.dll
Na*a5w9eoz0regsvr32 /s tdc.ocx
!t |.n)rGX/N0regsvr32 /s MSR2C.DLL
[0a0A)X]0regsvr32 /s msident.dll51Testing软件测试网2vjFG'mS e:U
regsvr32 /s msieftp.dll51Testing软件测试网1i$Inw%aw_;X
regsvr32 /s xmsconf.ocx
(b/Uzm9U%qB0regsvr32 /s ils.dll
-Pw]?3~b#QzM%S FVy0regsvr32 /s msoeacct.dll51Testing软件测试网.jw!H#ArH)N
regsvr32 /s wab32.dll51Testing软件测试网c6Zdb.o4v
regsvr32 /s wabimp.dll
}&KrVu&D0regsvr32 /s wabfind.dll51Testing软件测试网8W4L7iU7}8YK
regsvr32 /s oemiglib.dll51Testing软件测试网W#c(R%B)MI}A
regsvr32 /s directdb.dll
^|g"x~P0regsvr32 /s inetcomm.dll51Testing软件测试网WpUJH hx {
regsvr32 /s msoe.dll51Testing软件测试网8U'gz_9y Q
regsvr32 /s oeimport.dll51Testing软件测试网E Ld hV/|(f o
regsvr32 /s msdxm.ocx
1x*Y|RL c^S0regsvr32 /s dxmasf.dll51Testing软件测试网Y3? ?m.aE*f;R(j?
regsvr32 /s laprxy.dll51Testing软件测试网3HIr1d8K.[.W:e
regsvr32 /s l3codecx.ax51Testing软件测试网8VB] U,j.],_
regsvr32 /s acelpdec.ax
G!{4X)x"{h7d}d {0regsvr32 /s mpg4ds32.ax
5z ASGcoFe Sa'nl4A0regsvr32 /s danim.dll51Testing软件测试网!Of:e*H-t^
regsvr32 /s Daxctle.ocx51Testing软件测试网Gok LG Yp
regsvr32 /s lmrt.dll51Testing软件测试网"c;Je*ch `Q(LF$n
regsvr32 /s datime.dll
/M|.S*ETS2| u0regsvr32 /s dxtrans.dll
*fK1fgUf.T^T0regsvr32 /s dxtmsft.dll51Testing软件测试网WtP)|r/MP1[ R4x a
regsvr32 /s wshom.ocx51Testing软件测试网p EwVoX2r/\;pb
regsvr32 /s wshext.dll
"|gV h;qG6]4m0regsvr32 /s vbscript.dll51Testing软件测试网~]%Zd&v1FKs
regsvr32 /s scrrun.dll mstinit.exe /setup51Testing软件测试网H!I+[Z9xz ?
regsvr32 /s msnsspc.dll /SspcCreateSspiReg
YT8}K0cex:_%|"H0regsvr32 /s msapsspc.dll /SspcCreateSspiReg
6z/W2y ex3I0echo.51Testing软件测试网]+d*hQ`
echo.51Testing软件测试网'{ C GEW PS3TH4I

51Testing软件测试网a!g-T7w+^:Q.w.vb]t

2)运行regsvr32 scrrun.dll

b2~*GWj L.b2t4RV0

'lX:w9GE}*a03)IE-工具-选项-安全-自定义级别-启用所有ActiceX控件或插件51Testing软件测试网4MbM1X b4m&l:V:l

51Testing软件测试网)i T H8jm

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

%B'CL-r7K lp n:N3d0

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