运行时错误 800A01A8 [英] Run time error 800A01A8

查看:73
本文介绍了运行时错误 800A01A8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在卡住了!有人可以帮忙吗?!这是我不断收到的消息:

Windows 脚本宿主脚本:C:\Documents and Settings\Me\Application Data\bits2\windows.vbs线路:9字符:1错误:需要对象:'intOptionsSet'代码:800A01A8来源:Microsoft VBScript 运行时错误

Windows Script Host Script: C:\Documents and Settings\Me\Application Data\bits2\windows.vbs Line: 9 Char: 1 Error: Object required: 'intOptionsSet' Code: 800A01A8 Source: Microsoft VBScript runtime error

这是我的脚本:

Set WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2"
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 256
objTarget.CopyHere objSource, intOptions

推荐答案

objShell.NameSpace() 不喜欢相邻的 2 个反斜杠,即 c:\\

objShell.NameSpace() does not like 2 backslashes next to each other, i.e. c:\\

(除非是网络路径,即 \\192.168.0.1\Folder)

代码的前 9 行:

Set WshShell = CreateObject("Wscript.Shell")
appdata= WshShell.ExpandEnvironmentStrings("%appdata%")
strZipFile = appdata & "\bits2\file.zip"
outFolder = appdata & "\bits2" 'Line #4
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder) 'Line #7
intOptions = 256
objTarget.CopyHere objSource, intOptionsSet. WshShell = CreateObject("Wscript.Shell") 'Line #9

也许第 9 行正在爆炸,因为第 7 行的 outFolder 中有:\\".outFolder 在第 4 行定义.

Maybe line #9 is blowing up because outFolder on line #7 has ":\\" in it. outFolder is defined on line #4.

这篇关于运行时错误 800A01A8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆